re: Instantiating a Java Class

2002-01-25 Thread Peter Alfors


If it is a class, you could:
1. add it to the WEB-INF/classes directory (in the appropriate directory
structure)
2. Add the class directly to the classpath

Also, import the file in your page such as:
%@ page import=org.apache.jsp.tr %

HTH,
Pete

Hi

Iam a novice to Struts and need your help .

My jsp is this

-
%@ page language=java %

%@ taglib uri=/WEB-INF/app.tldprefix=app %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %

%
tr xyz = new tr() ;
%
-

When executed ,
javax.servlet.ServletException: org/apache/jsp/tr
Root cause : java.lang.NoClassDefFoundError: org/apache/jsp/tr

I have included org/apache/jsp/tr at almost every level of folders .

Any idea why this occurs .
Where is it actually expecting the tr.class file to be ?

Thanks

Syed



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


Re: Including results from one action on a different actions jsp page

2002-01-11 Thread Peter Alfors

Here are a couple options:

1.  Create your page as a frameset...  Then each frame can have it's own
action as its source.
2.  Use one action that is responsible for retrieving all of the
information for one page.  The internal code may have to reference
helper classes (or maybe even other action(s)), but doing this will
allow your JSP page to have only one action.
3. You can link actions, so your first action can retrieve the pictures
(or whatever) then link to the next that will retrieve the form
information (for example) and finally forward to the JSP page for
display.

HTH,
Pete

what about the use of iframe tag?
iframe src=..
HTH
Pino
- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, January 11, 2002 1:57 AM
Subject: Including results from one action on a different actions jsp
page -
How do I do this?


 Hi

 I have an action - (action 1), associated with this action is a jsp
 page.  What I want to do is have part of the content of this jsp page
to
 be generated by another action - (action 2)

 -jsp page used by (action 1) start---
 html


 I want to include here content from (action 2)


 /html

 jsp page used by (action 1) end---

 Can someone please tell me how to do this.  Its kind of like
 how I include pictures at the moment, but instead of a picture I have
a
 form.  This is what I have for pictures.

 -jsp page used by (action 1) start---
 html


 img src=html:rewrite page=/generateImage.do/

 /html

 jsp page used by (action 1) end---




 Cheers

 Antony


 --
 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 return to the page that called the action class?

2001-12-13 Thread Peter Alfors

There are a couple options I can think of:

1. use request.getHeader(Referer)
2. add a property to your generic class that holds the return link.
Then have the calling class set it.
3. you could use javascript to back up, but that is ugly...

HTH,
Pete

Hi,

I have a generic action class that I want to set up that when the class
is
successful it send the user back to the page from which they came. How
do I
get that information? And, how would I structure my class to allow it
to
send the user back?

Thanks for any info.

Alex



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


re: forward to jsp or to do ?

2001-12-13 Thread Peter Alfors

Correct, if you forward to a jsp, it will display the compile jsp
servlet.  If you forward to a do, then it
will look for that action in your actions-config.xml and execute the
appropriate action class.

This allows you to chain actions together.

HTH,
Pete

What' s the difference between a forward to jsp or to do ?

In case of forward to jsp  just servlet compiled from the jsp file will

be called. Am I right ?

What will happen if I forward to *.do ?

regards,
Maris


global-forwards
forward   name=logon  path=/logon.jsp/
forward   name=logoff path=/logoff.do/



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


Re: request

2001-11-27 Thread Peter Alfors

Hello Amit,

You do not need Ant in order to use Struts.  Ant is a tool for
compiling/jarring/installing/etc that can make building/testing/installing much
more efficient (and easier - in my opinion).  Personally, I think it saves me quite
a bit of time during testing, so I would recommend it.  The Struts architecture
includes java classes, so you will need to have some method for compiling them
(javac, JBuilder, etc).  Other than that, you can do everything else in a text
editor if you would like.  I would suggest taking a look at Ant, and maybe join the
list server for additional help with it.

Actually, I have never looked at the documentation.  I kinda learned as I went
along, so I would not be a good person to ask for this.  Hopefully someone else on
the list can give their opinion.



Amitkumar J Malhotra wrote:

 Hello peter,
 just read your mail from one of the mailing lists.wanted to ask you a few
 questions about struts,
do i need to use/install ant for using struts
i am a total newbie.is the documentation on-line enough or should i refer to
some books that are available now for the same
how is the learning curve for the same

 best regards
 amit malhotra



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


Re: JSP page without form bean ?

2001-11-20 Thread Peter Alfors

Unless this is a new feature of struts, you may create an action
without specifying a form using the following syntax:

action path=/myPage
type=com.web.myAction
  forward name=success path=/myPage.jsp/
/action

We are using Struts: 1.0 beta 3 (release build June 2, 2001)

HTH,
Pete


 You can specify an action without a form bean with this syntax:

 actionpath=/main
 forward=/Main.jsp
 /action

 The limitation here is that there is no corresponding Struts Action
class
 either.  The above syntax is a solution I had to use when the customer

 wanted a button to trigger a URL as opposed to a hyperlink trigger.

 As far as I was able to determine, you cannot specify an action in the

 struts configuration that has an action class, but no form-bean.  My
 application has plenty of screens that triggered actions on form
submit,
 but had no entry fields on them.  In these cases I used the normal
action
 syntax in the struts configuration file but pointed to a dummy form
- a
 form bean with no properties.

 Allowing an action to be specified with an action class but no form
bean
 would be a nice struts enhancement.

 Jim Weaver
 Software Developer - ThoughtWorks



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


Re: How to open a new browser window in struts

2001-10-04 Thread Peter Alfors

You can set the target of the form to be a new window.  The browser will
then be responsible for
loading the resulting page into a new window.

HTH,
Pete

[EMAIL PROTECTED] wrote:

 Hi,

 I am new to Struts.

 I am having a form where in the user can enter the search criteria and
 click the submit .
 We need to  show the search results in a new window as popup.

 If I use actionMapping.findForward() in the perform method of Action
 class it shows the results in the same window.How can I  display the
 results in the new window.

 Can anyone pull me out from this problem?

 Thanks in advance,
 Yugandhar




Re: Refreshing/Reloading MessageResources

2001-10-04 Thread Peter Alfors


You can create an administrator action to peform this for you.
I think that the struts-example app might have an example of this.
You might want to check the archives, because this question has been
asked many times.
HTH,
 Pete
Mitesh Mehta wrote:
Is
there a way to refresh/reload messages from a resource bundle once they
have been cached in memory?Mitesh
Mehta
S1 Corp (http://www.s1.com)


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: freeing resources

2001-10-03 Thread Peter Alfors


I think you want to look into the HttpSessionBindingListener.
Search the archives for this, I believe others have asked pretty much
this same question.
HTH,
 Pete
Anish Acharya wrote:
Hello
everyone. Just a quick question for you. I want to free certain
resources and clear certain objects from the session scope when a user
ends their respective session. Where is the best place to do this?Thanks
for any help you can provide.Lates,Anish
AcharyaSoftware
DeveloperAmdocs
Toronto



Re: Can an action be cancelled once the submit button is clicked.

2001-10-02 Thread Peter Alfors



Mike Bungay wrote:

 This question is to anyone that can possibly help me.  I have a jsp form
 that is running 3 actions, these actions are managed by JavaScript (i.e. if
 delete is pressed the action is changed to delete.do, etc.).

 My question:Is there anyway to stop an action from running (continuing)
 in the JavaScript?? i.e. if a record is not selected I want to stop the
 action from occuring instead of it running my default action.


You could use javascript to validate that the necessary field(s) are filled in
before executing the form submit.
Once the form is submitted, the page no longer has control, therefore, you
cannot stop the action processing once it has begun.  However, if you can verify
that there is a problem in your action class, you can exit early.  Not sure if
that helps you.


 Question 2: I am also wondering if there is anyway to capture
 the success mapping in the jsp to trigger another event??  i.e. on the
 success of the delete.do action I want to refresh the window that opened the
 delete.jsp page.


Are you opening the delete.do in another window?  If so, you can use javascript
in the new window to ask the window.opener to reload itself.  If the delete.do
action is successful, forward to a page that performs this javascript.
Otherwise, forward to some error page.

If you are executing the delete.do in the current window, then you will be
leaving the current page, and therefore is a moot point.


 Question 3: Does any know of any combo box field either in
 struts or in html that I can use??


There is no such thing as a combo box (where you can select from a list or type
into the field).  This is an HTML limitation.


 Thanks everyone,

 Mike

HTH,
Pete


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Dynamically obtaining component definition name

2001-10-02 Thread Peter Alfors

he should send an email to:

[EMAIL PROTECTED]

to unsubscribe himself.



Mark Backstrom wrote:

 Please unsubscribe Trevor Lewis from this distribution.   He may be
 receiving it under [EMAIL PROTECTED]

 Thanks,

 Mark Backstrom
 Systems Support Engineer
 Loudeye Technologies

 -Original Message-
 From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 9:01 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Dynamically obtaining component definition name

   Hi Sean,

   Actually, there is nothing to obtain the name of the definition used to
 insert Component/Tile.
   Even if such mechanism exist, you will not get what you want from within
 'top.jsp', because you are one level behind site.default.

   You can effectively put an attribute carrying the name. But you need to
 pass if to top.jsp when you insert it.
   This can be done in site-template.jsp with something like :

   tiles:insert name=top 
 tiles:put name=name beanName=name beanScope=template /
   /tiles:insert

 Cedric

 Sean wrote:

  I have a definition something like this:
 
  definition name=site.default
  template=/WEB-INF/views//site-template.jsp
 put name=top  content=/WEB-INF/views/top.jsp /
  put name=left content=/WEB-INF/views/left.jsp /
 put name=content  content=/WEB-INF/home.jsp /
  put name=rightcontent=/WEB-INF/right.jsp /
 put name=bottom   content=/WEB-INF/bottom.jsp /
/definition
 
  from within the top.jsp and left.jsp I want to obtain the name of
  the calling compontent definition to do something.  Is this possible?
  short of creating a new attribute and putting that in the definition
  like:
 
  put name=name content=site.default/
 
  Is there a way to get a hold of this variable? Any help would be
  appreciated.
 
  Sean


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Html:select question

2001-10-02 Thread Peter Alfors

I haven't actually used the html:select tag, but it looks as though is
expects to retrieve data from a bean.
The name attribute specifies which bean to use (in the pageContext) and the
property attribute specifies which
property of the bean to use.

HTH,
Pete

Kilmer, Erich wrote:

 In the struts example struts-select.jsp there is this code:
   html:select property=singleSelect size=10
 html:option value=Single 0Single 0/html:option
 html:option value=Single 1Single 1/html:option
 ...
 html:option value=Single 9Single 9/html:option
   /html:select

 When I try this code:
 html:select property=status size=2
html:option value=enabledEnabled/html:option
html:option value=disabledDisabled/html:option
 /html:select

 I get:
 500 Internal Server Error
 javax.servlet.jsp.JspException: No getter method available for property
 status for bean under name org.apache.struts.taglib.html.BEAN
 at org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:304)
 at /input.jsp._jspService(/input.jsp.java:322) (JSP page line 98)
 at com.orionserver[Orion/1.5.2 (build
 10460)].http.OrionHttpJspPage.service(Unknown Source)

 Why? I want status to be the name of the request parameter that is sent
 back. Why does Struts think this is a bean property?

 Should I use something other than property?
 TIA,

 Erich Kilmer
 Bell+Howell
 RTP, NC




Re: multiple resource files in ActionServlet?

2001-10-02 Thread Peter Alfors



I don't believe that you can do this.
However, there are a couple of options available to you...
1. Make multiple files and merge them when you build your project.
2. Extend ActionServlet and allow multiple resource bundles to
be read in.
I believe there was some mention a while back about automatically merging
multiple bundles specified in the web.xml file.
However, Im not sure if anything came about.
Check the archives...
HTH,
 Pete

Matteo Di Giovinazzo wrote:

In the web.xml
webapp descriptor file it's possible to add in the ActionServlet declaration
multiple Resource files?Can I Write this?
web-app>

!-- Action Servlet Configuration -->
servlet>
 servlet-name>action/servlet-name>
 servlet-class>org.apache.struts.action.ActionServlet/servlet-class>

 init-param>
 param-name>application/param-name>
 param-value>guestbook.GuestbookResources/param-value>
 /init-param>
 init-param>
 param-name>application/param-name>
 param-value>todolist.MessagesResource/param-value>
 /init-param>

 init-param>
 param-name>config/param-name>
 param-value>/WEB-INF/struts-config.xml/param-value>
 /init-param>
 init-param>
 param-name>debug/param-name>
 param-value>2/param-value>
 /init-param>


/servlet>

/web-app>


Thanks in advance to all!Matteo
Di Giovinazzo





Re: multiple resource files in ActionServlet?

2001-10-02 Thread Peter Alfors

We do this with PC specific code like:

!-- NOTE: Begin NT specific behavior. --
!-- Start the Windows command interpreter, run the specified command, exit
--
exec dir=. executable=cmd.exe
 arg value=/C/ !-- Carries out the command specified by string and then
terminates --
 arg value=copy/ !-- The command to be executed --
 arg value=resource1.properties+/
 arg value=resource2.properties/
arg value=mergedresources.properties/
/exec

HTH,
Pete


Levi Cook wrote:

 Probably a good question for the ant-user list, I'd check their archives
 out at:
 http://www.mail-archive.com/ant-user@jakarta.apache.org/

 Offhand, I'm not aware of an ant task that performs the merging you ask
 for. If you're not super worried about platform independent builds you
 could apply the exec task on something like this:

 (winnt/win2k)
 type 1st.properties  all.properties  type 2nd.properties 
 all.properties

 Or

 (*nix)
 cat 1st.properties  all.properties  cat 2nd.properties 
 all.properties

 Regards,
 Levi Cook

 -Original Message-
 From: DEHAMER,BRIAN (HP-MountainView,ex1) [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 3:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: multiple resource files in ActionServlet?

 Is there anyway to have Ant merge multipe message resource files
 together at build time?

 Brian DeHamer
 [EMAIL PROTECTED]

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 1:31 PM
 To: [EMAIL PROTECTED]
 Subject: Re: multiple resource files in ActionServlet?

 I don't believe that you can do this.
 However, there are a couple of options available to you...
 1.  Make multiple files and merge them when you build your project.
 2.  Extend ActionServlet and allow multiple resource bundles to be read
 in.
 I believe there was some mention a while back about automatically
 merging multiple bundles specified in the web.xml file.
 However, Im not sure if anything came about.
 Check the archives...
 HTH,
 Pete

 Matteo Di Giovinazzo wrote:
 In the web.xml webapp descriptor file it's possible to add in the
 ActionServlet declaration multiple Resource files? Can I Write this?
 web-app
 
  !-- Action Servlet Configuration --
  servlet
   servlet-nameaction/servlet-name
   servlet-classorg.apache.struts.action.ActionServlet/servlet-class
   init-param
param-nameapplication/param-name
param-valueguestbook.GuestbookResources/param-value
   /init-param
   init-param
param-nameapplication/param-name
param-valuetodolist.MessagesResource/param-value
   /init-param
   init-param
param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   init-param
param-namedebug/param-name
param-value2/param-value
   /init-param
 

 /servlet
 
 /web-app

 Thanks in advance to all! Matteo Di Giovinazzo




Re: getting the servlet context

2001-10-01 Thread Peter Alfors

try

  pageContext.getServletContext()

HTH,
Pete

Johnson, Nathaniel wrote:

 Does anyone know how to get the servletContext from within a custom tag
 (public class MyTag extends SupportTag...)

 Thanks!
 Nate


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Why is it so difficult to make Struts working in JBuilder 5?

2001-08-27 Thread Peter Alfors




Liu, Xin wrote:

 Why can't we treat struts.jar the same as other struts, i.e., why cannot we
 put struts.jar into classpath?

You can place the struts.jar in the classpath.
However, then you must make sure you do not have another copy of it in the lib
directory.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: New window with the current session.....

2001-08-27 Thread Peter Alfors



Check out the window.open() javascript method.
HTH,
 Pete
Jean-Francois Brassard wrote:

Hello,I
need some help for create a new window with no status bar and a specific
size, and with the current session.Thank
you in advanceJeff




begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: pre-populate and request scope problem in struts.

2001-08-21 Thread Peter Alfors


I assume that your select tag is expecting to get data from your form object that you 
had
previously placed into the request?
When you return to the 'toJsp' page, you will need to place the form object back into 
the
request, or place the form object in the session in the first place.
When you say that your edit command returns to the previous page, is it going through 
an
action?  If so, you would want to place the form back into the request there
(if you do not want to use the session).

Pete

However, I would suggest that

BinhMinh Nguyen wrote:

 Hi,
 I have the following problem, can anyone help me to
 spot it.

 I am using the following technique for pre-populate:

 1- in the Action object   of 'fromJSP' , I create an
 objetc of the Form objetc of the 'toJSP'
 2-I then set all the properties  of the Form objetc of
 the 'toJSP' here by calling the setters of this Form
 object. As followed:

 Partner partner = new Partner(tradingID,
 fnDataSource);
 //get the product-list from a given partner
 String[] products = partner.getProducts();

 //pre=populating
 System.out.println(RetailerMainAction-
 Data-Pre-Populating for form processForm);
 ProcessForm processForm = new ProcessForm();

 processForm.setProducts(products);
 System.out.println(RetailerMainAction- set
 product-collection);

 processForm.setTradingID(tradingID);
 System.out.println(RetailerMainAction- set
 partner-ID);

 
request.setAttribute(processForm,processForm);

 //the_session.setAttribute(processForm,processForm);
 System.out.println(RetailerMainAction- 
save
 processForm bean);

 3- set the Form object to the request scope.
 request.setAttribute(processForm,processForm);


 4- then I give out the 'toJSP'

 so far, every works perfectly. All the properies are
 preloaded as expected.

 P
 font color=green size=+2
Trading IDnbsp;bean:write  name=processForm
 property=tradingID scope=request
 /(%=user_name%)
 /font

 hr
 table border=0 width=100%
 trtd colspan=2nbsp;/td/tr
 tr

 td align=left width=10%
Product-Line:nbsp;nbsp;
 /td

 td align=left
html:select property=selProduct size=1 
 html:options property=products /
/html:select

 /td
 /tr

 5- then in the 'toJSP' I issue a command submit to g
 oto the 'lastJSP'. The action forward the request is
 defined in strut-config.xml as below:

 !-- Order --
  action path=/main/order/order

 type=com.furnishnet.struts.OrderAction
  name=orderForm
  input=/main/order/order_screen.jsp
  scope=request
  validate=false

 forward  name=confirm
 path=/main/order/order_screen.jsp/
 forward  name=process_edit
 path=/main/operation/process_screen.jsp /


  /action

 In this 'lastJSP'   I have the button Edit which
 bring the user back to the previous JSP, 'toJSP'.
 But the serlvet raised an exception. There is
 something wrong with the select tag and option
 tag,
 if I remove these tag from the JSP, before I
 come-back  to this 'toJSP', nothing worng happens,
 therefor, there must be something wrong with this
 property and the Form that I save off the attribute

 Can some one spot it out for me please.

 really appreciate you help

 Binh Nguyen


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




Re: forward problem with frames

2001-07-31 Thread Peter Alfors

There is a target attribute in the html:FormTag
Have you tried setting the target to _top ?

HTH,
Pete

Stefan Faist wrote:

 Hi all,
 why have a frameset and open a link without this framset. Then I want to go
 back to the frameset with this forward.
 forward name=start_mitarbeiter path=/main.jsp/ the main.jsp is the
 page with the frameset.

 But this forward opens a new window? Why does it do that and how can I open
 this in the same Window? This forward called with a html:submit tag in the
 action class. With a link I have the target parameter but with the button I
 havn't nothing or ...?

 Can somebody help me?

 Stefan




Re: Retrieving browser locale

2001-07-30 Thread Peter Alfors


Andreas Leitner wrote:

 Hi,

 (Not sure if this belongs to struts or tomcat). How do I find out what
 language the user (resp. html-browser) preferes?


request.getLocale()


 Second, I read at various places about users and roles in tomcat and
 struts, where can i find out more about that mechanism and how to use
 it?

 Many thanks in advance,
 Andreas

Pete




Re: newbie question

2001-07-26 Thread Peter Alfors



In your web.xml, there should be a section that maps the *.do extension
to the action servlet, for example:
 !-- Action Servlet Mapping -->
 servlet-mapping>
 servlet-name>action/servlet-name>
 url-pattern>*.do/url-pattern>
 /servlet-mapping>
However, if you are running the example, It should be in there.
Pete

Jonathan Yang wrote:

 The appserver is
tomcat3.2.3. can sucessfully show the index.jsp, and when I click the url,
the error appear... It seems that it can't know the *.do, how I can resolve
it? Regards,
Jonathan

- Original Message -

From:Kevin
McLain

To: [EMAIL PROTECTED]

Sent: Thursday, July 26, 2001 11:37
AM

Subject: RE: newbie question
What
steps did you take to get to that point? What web container are you using?

-Original
Message-
From: Jonathan Yang [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25,
2001 8:35 PM
To: struts
Subject: newbie question
Hi,all
Why can't correctly run the "struts-example"? When
I click the url in index.jsp,it throw the a error likefollowing:
"The requested URL /struts-example/tour.do;jsessionid=5ox6pc4q91
was not found on this server."
why? pls help me, thx. Regards,
Jonathan







Re: Struts and Frames

2001-07-26 Thread Peter Alfors

The struts tags have a target attribute that you may set to point to the
desired frame.
Since the target is actually handled by the browser (as where to display
the results), there isn't really much handling to be done by struts.
Our site has 3 frames within a frameset.  We have not experienced any
problems.
However, we are also not moving in and out of the frames.
I guess it may prove a little more difficult if you want to go from a
frameset to a single frame, then back to a frameset with dynamically
specified pages.  Even so, this is not really a struts issue, but more of
an app design issue.

Pete

Andreas Leitner wrote:

 I would like to use Stuts together with HTML frames. Are there any tag
 libraries available?

 Has anybody done that before? Has anybody had good/bad experience with
 it?

 Tia,
 Andreas


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: forward an _parent Frame

2001-07-26 Thread Peter Alfors

One solution would be to have your action point to a frameset.  If you do not
know which pages you want in the frameset until after the original action has
been completed, you could have your frameset point to other actions.  This way,
each frame may decide which final page to access.

HTH,
Pete

Stefan Faist wrote:

 Hallo All,
 I have a frameset and in this frameset I oben an new page in the hole
 window, without frames.

 Now I click a button and I want to go back to the frameset.

 How can I do this? In the struts-config I can't use the parameter target in
 the forward element.
 Any help on this?

 Stefan




Re: Baisc q 2 Cannot find message resources u/key -

2001-07-24 Thread Peter Alfors

The name of your web app is bbnpa?
Then shouldn't your WEB-INF directory be located here?

/bbnpa/WEB-INF

Pete

Chuck Amadi wrote:

 Hi i still get the following error message.

 My path is
 /bbnpa/helloworld/WEB-INF/classes/helloworld/HelloWorldResources.properties
 Any more pointers Cheers Chuck

 Error: 500
 Location: /bbnpa/helloworld/hello.jsp
 Internal Servlet Error:

 javax.servlet.ServletException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE

 Chuck Amadi wrote:
 
  Hi , can anyone work out this one i have followed the correct procedures
  albeit i am missing somthing. (bbnpa the name of my application)
 
  My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp
  1) declared directives.
  2) created property file.
  3) created web.xml file.
  4)Copied all necessary .tld to /helloworld/WEB-INF/
  5)Copied all necessary .jar's to /WEB-INF/lib
  6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir.
 
  Wats left error below
 
  Error: 500
  Location: /bbnpa/helloworld/hello.jsp
  Internal Servlet Error:
 
  javax.servlet.ServletException: Cannot find message resources under key
  org.apache.struts.action.MESSAGE
 
  Cheers Chuck.
 
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.
  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal  rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.




Re: Baisc q 2 Cannot find message resources u/key -

2001-07-23 Thread Peter Alfors

In your web.xml, what do you have defined for the application init-param?
where is your properties file located?

You have a couple of options:
You could place the properties file in your classes jar (in the appropriate
directory structure)
or you can place it in the WEB-INF/classes directory (within the appropriate
directory structure specified in the application init-param).

Pete

Chuck Amadi wrote:

 Hi , can anyone work out this one i have followed the correct procedures
 albeit i am missing somthing. (bbnpa the name of my application)

 My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp
 1) declared directives.
 2) created property file.
 3) created web.xml file.
 4)Copied all necessary .tld to /helloworld/WEB-INF/
 5)Copied all necessary .jar's to /WEB-INF/lib
 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir.

 Wats left error below

 Error: 500
 Location: /bbnpa/helloworld/hello.jsp
 Internal Servlet Error:

 javax.servlet.ServletException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE

 Cheers Chuck.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.




Re: Baisc q 2 Cannot find message resources u/key -

2001-07-23 Thread Peter Alfors

Is your property file then located here ?

WEB-INF/classes/helloword/HelloWorldResources.properties

Pete

Chuck Amadi wrote:

 Hi , in my wem.xml i have the following defined for the apllication
 init-param.

init-param
   param-nameapplication/param-name
 param-valuehelloworld.HelloWorldResources/param-value
/init-param
   load-on-startup1/load-on-startup
/servlet

 Tried the second option previously and again no joy.
 The first option can i drag  drop into the classes .jar the property
 file as all my jar's are in my WEB-INF/lib dir.

 Cheers Chuck

 Peter Alfors wrote:
 
  In your web.xml, what do you have defined for the application init-param?
  where is your properties file located?
 
  You have a couple of options:
  You could place the properties file in your classes jar (in the appropriate
  directory structure)
  or you can place it in the WEB-INF/classes directory (within the appropriate
  directory structure specified in the application init-param).
 
  Pete
 
  Chuck Amadi wrote:
 
   Hi , can anyone work out this one i have followed the correct procedures
   albeit i am missing somthing. (bbnpa the name of my application)
  
   My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp
   1) declared directives.
   2) created property file.
   3) created web.xml file.
   4)Copied all necessary .tld to /helloworld/WEB-INF/
   5)Copied all necessary .jar's to /WEB-INF/lib
   6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir.
  
   Wats left error below
  
   Error: 500
   Location: /bbnpa/helloworld/hello.jsp
   Internal Servlet Error:
  
   javax.servlet.ServletException: Cannot find message resources under key
   org.apache.struts.action.MESSAGE
  
   Cheers Chuck.
  
   --
   The views expressed by the sender of this message don't
   necessarily represent those of Brecon Beacons National Park
   Authority. This message is intended for the addressee(s) only
   and is sent in confidence; if you receive it in error, please can you
   let us know (at [EMAIL PROTECTED]) and then destroy all copies.
   Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
   adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
   Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
   yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
   mewn camgymeriad, a fyddech gystal  rhoi gwybod i
   ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.




Re: How to get the entire URL of referring page

2001-07-20 Thread Peter Alfors

You could use:  request.getHeader(Referer)

Which class has the getReferrer() method?

HTH,
Pete

Web Programmer wrote:

 Hi All!

 I am trying to capture of the entire URL of where the
 user has come from - i.e., the URL of the previous
 page.  I am getting null value when I invoke the
 getReferrer() method.

 Thanks.

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/




Re: Basic ant's q regarding unexpected element copy

2001-07-19 Thread Peter Alfors

You are ending your target prematurely.

target name=copy depends=jar/

should be:

target name=copy depends=jar

HTH,
Pete

Chuck Amadi wrote:

   Hi  there folks, I have taken the second plunge into my buildfile
 experience the first was fine nevertheless i have a question my second
 buildfile states an error ie Unexpected element copy
 \build.xml:37:

 !-- ===--
 !-- Copy the jar files to release directory--
 !-- ===--
 target name=copy depends=jar/
  copy todir=${jardir} ///this is line
 37
fileset dir=${basedir} includes=*jar/
 /copy
   /target
 /project

  Any ideas Cheers Chuck

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Tutorial for beginers

2001-07-19 Thread Peter Alfors



maybe try:
http://www.husted.com/about/struts/resources.htm#tutorials
HTH,
 Pete

Adriano de Pinho Tavares wrote:

Hi
All!Does Anybody knows
a strut tutorial for beginers?Thanks
in advanceAdriano





Re: Is there a way to localize error-messages produced by the system?

2001-07-19 Thread Peter Alfors

One option:
When you trap an error, look up the i18n text for that specific error.
Then place the translated text in your error bean.
Your page can then use the format:

bean:write name=asimerror property=error/

For example, when you trap the exception that you were unable to connect to
the database, lookup
login.error.label.noserverconnection and place the translated text in the
error bean.

HTH,
Pete

Hartmut Bernecker wrote:

 Hi,

 I have no idea how to localize errors produced by the system itselfe.

 - There is no problem for me to localize the Struts-Application with
 localized property files (labels, buttons, validation errors of forms
 etc.).

 But now an example where I don't know how to do:
 A login action checks if the connection to the backend server is ok.
 If not then I populate a special special error-bean in the session with
 an error message to be shown:

 bean:write name=asimerror property=error/

 That is no problem. But how can I localize that System-Error-Message???

 I thougt about using a error-key (like:
 login.error.label.noserverconnection) within a JSP element like:

 bean:message key=login.error.label.noserverconnection/

 But I don't know how to put the login.error.label.noserverconnection
 dynamically in that line of code ...

 TIA for your ideas!
 Hartmut




Re: question about html:text tag

2001-07-19 Thread Peter Alfors

try disabled instead of disable

You can check the TLD for which attributes are valid for a given tag.

HTH,
Pete

D M wrote:

 Hi, I don't know if this question has been already submitted. Heck, I
 don't even know if this list is active.

 Anyways how do you use the html:text tag with the disabled/readonly
 property. I'm assuming the disabled would remove it from the user's view and
 readonly will set it to be uneditable. However if I do this:

 ... (in some html:form)
 html:text property=username value=ddd disable=true/
 ...

 I get this when going to that page:

 Parsing of JSP File '/addMessage.jsp' failed:
 
 /addMessage.jsp(32): for tag 'text' handler type
 'org.apache.struts.taglib.html.TextTag' has no property 'disable'
 probably occurred due to an error in /addMessage.jsp line 32:
 tdhtml:text property=username value=ddd disable=true//td

 if I try this line instead (same as above minus quotes):
 ... (in some html:form)
 html:text property=username value=ddd disable=true/
 ...

 then the html:text tag doesn't transform into regular html. So if I view
 source, I see the same line (html:text property=username value=ddd
 disable=true/). Same goes with readonly. Anyways I'm baffled if anyone has
 any ideas, I'll appreciate it. Can you reply directly to me also. Thanks.

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




Re: Getting session objects in an Action Form

2001-07-19 Thread Peter Alfors

You can access the session through the HttpServletRequest:

Object myObject = request.getSession().getAttribute(myKey);

HTH,
Pete

Melissa Rabin wrote:

 I need to access a session object within an ActionForm class - is this
 possible,  how?

 Melissa Rabin
 Web Developer


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: getting an action mapping into a servlet

2001-07-18 Thread Peter Alfors

check out:

org.apache.struts.taglib.html.FormTag.getActionMappingURL()

HTH,
Pete

Matt Raible wrote:

 Here's the entry for this mapping in the struts-config.xml

 action
path=/signIn

 type=us.co.douglas.application.timetracker.presentationlogic.SignInAction
name=signInForm
scope=request
validate=true
input=/signIn
  forward
   name=success
   path=/mainMenu /
   /action

 I'd like to get this /NASAppdo value into my servlet without adding
 anything to jsp's.

 Thanks,

 Matt

 --- Matt Raible [EMAIL PROTECTED] wrote:
  I have the following struts tag in my form:
 
  strutshtml:form action=/signIn focus=username
 
  That changes to the following when the jsp is compiled:
 
  form name=signInForm method=POST action=/NASApp/timetracker/signIn.do
 
  What I'd like to do is get the action string into a session variable, or some
  variable, so I can grab it and use it in a servlet.  Does anyone know how to
  do
  this?
 
  Thanks,
 
  Matt
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/




Re: just d/l installed ANT'S need some guidance!!

2001-07-11 Thread Peter Alfors


Is the ant.jar in your classpath?
Pete

Chuck Amadi wrote:
Hi again i have set my classpath within AutoExec.bat
as follows
set TOMCAT_HOME=C:\jakarta-tomcat-3.2.2
set ANT_HOME=C:\jakarta-ant-1.2
set JAVA_HOME=C:\JDK1.3
set PATH=%PATH%;%ANT_HOME%\bin
Thus on checking the ant's bin dir the ant.bat states the following.
Exception in thread "main" java.lang. NoClassDefFoundError org/apache/tools/ant/main.
Any Ideas.- Cheers Chuck
suhas wrote:
 Part 1.1 Type: Plain
Text (text/plain)
 Encoding:
quoted-printable
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: ant's Classpath just(ANT'S need some guidance!!)

2001-07-11 Thread Peter Alfors


Java expects all necessary classes/jars/etc to be in the CLASSPATH environment
variable.
try:
 set classpath=%ANT_HOME%\lib\ant.jar;
then try to run ant.
HTH,
 Pete
Chuck Amadi wrote:
The ant.jar is in the lib dir with the others.I was
aware that the classpath for ant must contain ant.jar and the other jar's
needed for my JAXP-compliant XML parser albeit i thought that %PATH% would
include all jar's. Thus what is the correct syntax.
set TOMCAT_HOME=C:\jakarta-tomcat-3.2.2
set ANT_HOME=C:\jakarta-ant-1.2
set JAVA_HOME=C:\JDK1.3
set PATH=%PATH%;%ANT_HOME%\bin - Believed that this was inclusive
for all jar's
set classpath=C:\jakarta-ant\bin\ant.jar (is this correct)
Cheers Chuck
Peter Alfors wrote:
 Part 1.1.1 Type: Plain
Text (text/plain)

Encoding: 8bit

Name: peter.alfors.vcf
 peter.alfors.vcf Type:
VCard (text/x-vcard)

Encoding: 7bit

Description: Card for Peter Alfors
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.




Re: SV: just d/l installed ANT'S need some guidance!!

2001-07-11 Thread Peter Alfors

I would look at the ant.bat file and see how it is attempting to pick up the
ant.jar file.
There should be something like:

for %%i in (%ANT_HOME%\lib\*.jar) do call %ANT_HOME%\bin\lcp.bat %%i

that will attempt to grab all of the jars in the ant/lib directory.
Check which environment variable it is appending them to. (Ant 1.2 uses
LOCALCLASSPATH)
Maybe add an echo to show the contents of the variable and make sure that you are
getting the ant.jar file??



Chuck Amadi wrote:

 Is this ok

 Peter Alfors wrote:

  print out your classpath and see which ant.jar is being used.
 
  Pete
 
  Chuck Amadi wrote:
 
   Oops forgot to mention that i am running Netbeans v 3.2.2 wereby ant's is
   apparently alreay bundled nevertheless i would like a standalone , as the
   ant 1.3 download is the current realease.
   Anyway would this cause any problems .
   Cheers Chuck
  
   Mikkel Bruun wrote:
  
please post the exception so we can look into it...
   
Mikkel
   
-Oprindelig meddelelse-
Fra: Chuck Amadi [mailto:[EMAIL PROTECTED]]
Sendt: 11 July 2001 14:43
Til: [EMAIL PROTECTED]
Emne: Re: just d/l  installed ANT'S need some guidance!!
   
Hi, tried that and just ant from the ms-dos command line and got
Exception in Thread - I assume that i have a classpath issue regarding
multithreading .
Any Suggestions Cheers Chuck
   
suhas wrote:
   
Part 1.1Type: Plain Text (text/plain)
Encoding: quoted-printable
   
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
  
   --
   The views expressed by the sender of this message don't
   necessarily represent those of Brecon Beacons National Park
   Authority. This message is intended for the addressee(s) only
   and is sent in confidence; if you receive it in error, please can you
   let us know (at [EMAIL PROTECTED]) and then destroy all copies.
   Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
   adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
   Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
   yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
   mewn camgymeriad, a fyddech gystal  rhoi gwybod i
   ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.

   
   Name: classjar.doc
classjar.doc   Type: Microsoft Word Document (application/msword)
   Encoding: base64
Download Status: Not downloaded with message


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Any more suggestions (Action Classes) WON'T COMPILE.

2001-07-10 Thread Peter Alfors

It looks as though you named the file ActionMapping.java when it should
be ApplicationMapping.java.
The file name must be the same as the class name.

HTH,
Pete

Chuck Amadi wrote:

 Hi all , well i have tried everthing in the book/doc's to no avail, I
 would like to know that say for instance if one declare a full
 classpath name i.e package classes/org/apache/struts/action; dir or
 does on just say declare package action; As i am still having problems
 with the Action Classes errors below.Also i have a modified Action
 class as per visual Pls check it out .

 note briefly i am unable to compile the .java classes.


 WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1]
 Class ActionMapping not found in type declaration or import.
 public final class ApplicationMapping extends ActionMapping {
   ^
 WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1]
 Public class action.ApplicationMapping is defined in
 
C:\jakarta-tomcat-3.2.2\webapps\bbnpa\WEB-INF\classes\org\apache\struts\action\ActionMapping.java
 and must be defined in a file called ApplicationMapping.java.
 public final class ApplicationMapping extends ActionMapping {
^
 3 errors
 Errors compiling ActionMapping.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





Re: Page is not cached

2001-07-10 Thread Peter Alfors

Do you have the ActionServlet init-param nocache set to true?

From ActionServlet.java:
nocache - If set to true, add HTTP headers to every response intended to defeat 
browser caching of any response we generate or forward to

HTH,
Pete


Zeltser, Mark wrote:

 Hello,

 I have struts 1.0 app running on tomcat and I noticed that one of my pages
 (output after uploading a file) is not cached by the browser (IE 5). By
 default ActionServlet doesn't include any headers prohibiting from caching.

 I tried manually set headers inside of the action prior to forwarding to
 template but it didn't help (somehow they didn't show up when I tried to
 print the headers out):

 
 
 10 Jul 2001 13:36:01,942 INFO  ContextServlet,55 - // Header
 Info
 10 Jul 2001 13:36:01,942 INFO  ContextServlet,59 -
 Cookie=JSESSIONID=5r5zy3v3o1
 10 Jul 2001 13:36:01,958 INFO  ContextServlet,59 - Host=njimtw860140:8080
 10 Jul 2001 13:36:01,958 INFO  ContextServlet,59 -
 Accept=application/msword, application/vnd.ms-excel,
 application/vnd.ms-powerpoint, image/gif, image/x-xbitmap, image/jpeg,
 image/pjpeg, */*
 10 Jul 2001 13:36:01,974 INFO  ContextServlet,59 - User-Agent=Mozilla/4.0
 (compatible; MSIE 5.0; Windows NT; DigExt)
 10 Jul 2001 13:36:01,989 INFO  ContextServlet,59 - Content-Length=546
 10 Jul 2001 13:36:01,989 INFO  ContextServlet,59 - Accept-Language=en-us
 10 Jul 2001 13:36:02,005 INFO  ContextServlet,59 - Accept-Encoding=gzip,
 deflate
 10 Jul 2001 13:36:02,005 INFO  ContextServlet,59 -
 Content-Type=multipart/form-data;
 boundary=---7d111e1211634
 10 Jul 2001 13:36:02,021 INFO  ContextServlet,59 - Connection=Keep-Alive
 10 Jul 2001 13:36:02,021 INFO  ContextServlet,59 -
 Referer=http://njimtw860140:8080/hp2/templates/CasImportTemplate.jsp
 10 Jul 2001 13:36:02,036 INFO  ContextServlet,61 - // End
 Header Info
 
 

 Did anyone encounter this problem?

 Thanks, Mark.

 --
 This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of this 
message you are hereby notified that any review, dissemination, distribution or 
copying of this message is strictly prohibited.  This communication is for 
information purposes only and should not be regarded as an offer to sell or as a 
solicitation of an offer to buy any financial product, an official confirmation of 
any transaction, or as an official statement of Lehman Brothers.  Email transmission 
cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that 
this information is complete or accurate and it should not be relied upon as such.  
All information is subject to change without notice.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Newbie: Difference between FORWARD and REDIRECT

2001-07-09 Thread Peter Alfors

Basically:
A forward will use the same request.
A redirect will create a new request.

HTH,
Pete

Holger Wiechert wrote:

 Hi,
 I know, this is a totally newbie question, but the struts manuals handle this issue 
quite marginal.
 So, what's the difference between a forward and a redirect?
 It would be all right, to get an URL to that topic, if there is one, so you don't 
have to fill this
 mailing list with it.

 Thanks in advance,
 Holger


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Retaining values for the page.....

2001-07-09 Thread Peter Alfors

Here is one option:

When you retrieve the data from the database in Test2Action, place it in the
session.  Then the next time Test2Action is
executed, check for its existence in the session.  If it exists, use it,
otherwise, refresh from the database.
When Test1Action is executed, remove the session attribute storing the list of
strings.  This way, when Test2Action is executed, it will be forced to refresh
from the database.

HTH,
Pete

Michael Skariah wrote:

 Hello all,
 Please have the patience to go thru'..

 Assume that I have 2 pages... test1.jsp and test2.jsp. A link present in
 test1.jsp opens up a child window with test2.jsp. I also have the following
 in the config file:

 action   path=/test2
 type=com.nri.xenos.uibase.ui.Test2Action
 name=test1ActionForm
 scope=request
 validate=false
 input=/test1.jsp
 forward name=failure  path=/test1.jsp/
 forward name=success  path=/test2.jsp/
 /action

 In Test2Action.java I am populating a ListString by using values from the
 database which is to be used in test2.jsp
 .
 But, here is my problem.
 Every time I click on the link to open test2.jsp, a fetch from the database
 is made.
 If the test2.jsp link is more than once, fetch should not be made every time
 I click on the link, but rather the first time only, and also when the
 test1.jsp is reopened or refreshed.

 I hope you all understand my question.

 Thanks a lot,
 -Michael.




Re: Struts and Javascript

2001-07-06 Thread Peter Alfors

I don't believe that this will work.
To my understanding, JavaScript does not have access to objects within a request or
session.
By the time the javascript is run, the request is dead.

There may be a better solution than this...
One solution would be to have your JSP page generate a javascript array declaration
containing the project names.
Then your toggle() method would create the array (if it has not been created yet)
and look up the project.
It would be ugly, but should work.


HTH,
Pete

DHarty wrote:

 I know this is getting out of context for for this list, but I've got a
 selection box populated with the name property of a bean.  I'd like to
 display the description property of that bean when the selection changes.
 I know you can use javascript commands in the select option, but I am unsure
 how to user javascript to get bean properties and then display them:

 I imaging psuedo code for the process  would look something like this:

 html:select onchange=javascript: toggle(); size=1 property=name 
 html:options name=ProjectSearch property=projects /
 /html:select

 function toggle() {
 Project proj = ProjectSearch.getProject(name);
 display(proj.getDescription);
 }

 any help would be greatly appreciated.

 D




Re: the build process !! found servlet others

2001-07-05 Thread Peter Alfors


You can leave the jar in the tomcat/lib directory. You just need
to make sure that it is included in your classpath when tomcat is started.
check your tomcat.bat file and make sure that it appends the jars in
the tomcat/lib directory to your class path on startup.
Or, you can add it manually if you prefer that.
I wouldn't put it in the WEB-INF/classes directory because it is a
common jar that all web apps will need.
Display your classpath in your tomcat window and see if it is included.
Pete

Chuck Amadi wrote:
Hi there again Peter i found them in jarkarta-tomcat-3.2.2\lib
there was also parser,ant,jasper,webserver,jaxp and servlet.jar thus i
have cp to my C:\jt-3.2.2\webapps/bbnpa/WEB-INF/lib.
I assume that is the correct .
Cheers Chuck
Peter Alfors wrote:
Do you have the servlet.jar in your classpath?
Pete
Chuck Amadi wrote:
> On attempting to creat the joinstruts project recieved the following
> error.
> Cheers Chuck
> compile:
> Created dir: C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> Copying 1 file to
> C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> Compiling 2 source files to
> C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> joinStruts/src/main/web/mailinglist/JoinAction.java [9] cannot resolve
> symbol
> symbol : class ServletException
> location: package servlet
> import javax.servlet.ServletException;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [10] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: package http
> import javax.servlet.http.HttpServletRequest;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [11] cannot resolve
> symbol
> symbol : class HttpServletResponse
> location: package http
> import javax.servlet.http.HttpServletResponse;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [41] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinAction
>
HttpServletRequest request,
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [42] cannot resolve
> symbol
> symbol : class HttpServletResponse
> location: class web.mailinglist.JoinAction
>
HttpServletResponse response)
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [43] cannot resolve
> symbol
> symbol : class ServletException
> location: class web.mailinglist.JoinAction
>
throws IOException, ServletException {
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [8] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: package http
> import javax.servlet.http.HttpServletRequest;
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [44] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinForm
> public void reset(ActionMapping mapping,
HttpServletRequest request)
> {
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [59] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinForm
>
HttpServletRequest request) {
>
^
> 9 errors
> joinStruts/build.xml [21] Compile failed, messages should have been
> provided.
> suhas wrote:
>
> > Part 1.1 Type: Plain Text (text/plain)
> >
Encoding: quoted-printable
>
> --
> The views expressed by the sender of this message don't
> necessarily represent those of Brecon Beacons National Park
> Authority. This message is intended for the addressee(s) only
> and is sent in confidence; if you receive it in error, please can
you
> let us know (at [EMAIL PROTECTED]) and then destroy all copies.
> Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
> adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
> Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
> yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
> mewn camgymeriad, a fyddech gystal rhoi gwybod i
> ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
 

Name: peter.alfors.vcf
 peter.alfors.vcf Type:
VCard (text/x-vcard)

Encoding: 7bit

Description: Card for Peter Alfors
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: the build process !! found servlet others

2001-07-05 Thread Peter Alfors


Oops, I was not answering the right question
You will need the Servlet.jar when running your app, but at the moment,
you need it to compile.
Therefore, make sure that it is included in your classpath in your
IDE, or in the ant script (if you are using ant), etc...
Pete
Peter Alfors wrote:
You can leave the jar in the tomcat/lib directory.
You just need to make sure that it is included in your classpath when tomcat
is started.
check your tomcat.bat file and make sure that it appends the jars in
the tomcat/lib directory to your class path on startup.
Or, you can add it manually if you prefer that.
I wouldn't put it in the WEB-INF/classes directory because it is a
common jar that all web apps will need.
Display your classpath in your tomcat window and see if it is included.
Pete

Chuck Amadi wrote:
Hi there again Peter i found them in jarkarta-tomcat-3.2.2\lib
there was also parser,ant,jasper,webserver,jaxp and servlet.jar thus i
have cp to my C:\jt-3.2.2\webapps/bbnpa/WEB-INF/lib.
I assume that is the correct .
Cheers Chuck
Peter Alfors wrote:
Do you have the servlet.jar in your classpath?
Pete
Chuck Amadi wrote:
> On attempting to creat the joinstruts project recieved the following
> error.
> Cheers Chuck
> compile:
> Created dir: C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> Copying 1 file to
> C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> Compiling 2 source files to
> C:\jakarta-tomcat-3.2.2\webapps\joinStruts\build\classes
> joinStruts/src/main/web/mailinglist/JoinAction.java [9] cannot resolve
> symbol
> symbol : class ServletException
> location: package servlet
> import javax.servlet.ServletException;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [10] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: package http
> import javax.servlet.http.HttpServletRequest;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [11] cannot resolve
> symbol
> symbol : class HttpServletResponse
> location: package http
> import javax.servlet.http.HttpServletResponse;
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [41] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinAction
>
HttpServletRequest request,
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [42] cannot resolve
> symbol
> symbol : class HttpServletResponse
> location: class web.mailinglist.JoinAction
>
HttpServletResponse response)
>
^
> joinStruts/src/main/web/mailinglist/JoinAction.java [43] cannot resolve
> symbol
> symbol : class ServletException
> location: class web.mailinglist.JoinAction
>
throws IOException, ServletException {
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [8] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: package http
> import javax.servlet.http.HttpServletRequest;
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [44] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinForm
> public void reset(ActionMapping mapping,
HttpServletRequest request)
> {
>
^
> joinStruts/src/main/web/mailinglist/JoinForm.java [59] cannot resolve
> symbol
> symbol : class HttpServletRequest
> location: class web.mailinglist.JoinForm
>
HttpServletRequest request) {
>
^
> 9 errors
> joinStruts/build.xml [21] Compile failed, messages should have been
> provided.
> suhas wrote:
>
> > Part 1.1 Type: Plain Text (text/plain)
> >
Encoding: quoted-printable
>
> --
> The views expressed by the sender of this message don't
> necessarily represent those of Brecon Beacons National Park
> Authority. This message is intended for the addressee(s) only
> and is sent in confidence; if you receive it in error, please can
you
> let us know (at [EMAIL PROTECTED]) and then destroy all copies.
> Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
> adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
> Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
> yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
> mewn camgymeriad, a fyddech gystal rhoi gwybod i
> ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
 

Name: peter.alfors.vcf
 peter.alfors.vcf Type:
VCard (text/x-vcard)

Encoding: 7bit

Description: Card for Peter Alfors
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghen

Re: Action forward to Action losing request objects ??

2001-07-05 Thread Peter Alfors



Is it possible that you are redirecting instead of forwarding?

Jonathan wrote:

I
am submitting to an Action which when successful places an object in the
request and forwards to a second Action, which looks for the item in the
request, and forwards yet again to a third Action which gets the item placed
in the request object by the previous Action:Action1>Action2(put
in object)>Action3(getobject)I
am loosing the object in the request between Action1 and Action2 for sure.
Anyone know why?




begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Action forward to Action losing request objects ??

2001-07-05 Thread Peter Alfors



All keys are separated by an ''
here is an example:
 /postsecure_jump.do?sessionid=12345height=10weight=100
HTH,
 Pete
Jonathan wrote:
It was a dumber
mistake which I wont go into ;^>Its
fixed, however I am now trying to redirect and it is not working.
In my action perform() I am doing the following:String
query = request.getSession().getId();
String action = "/postsecure_jump.do?sessionid=";
System.out.println(action+query);
return new ActionForward( action+query,
true);Can someone
tell me how to add query strings properly

- Original Message -

From:
Peter
Alfors

To: [EMAIL PROTECTED]

Sent: Thursday, July 05, 2001 3:49
PM

Subject: Re: Action forward to Action
losing request objects ??
Is it possible that you are redirecting instead of forwarding?

Jonathan wrote:

I
am submitting to an Action which when successful places an object in the
request and forwards to a second Action, which looks for the item in the
request, and forwards yet again to a third Action which gets the item placed
in the request object by the previous Action:Action1>Action2(put in
object)>Action3(getobject) I
am loosing the object in the request between Action1 and Action2 for sure.
Anyone know why?






begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: SV: pls Help Invalid Package Declartions .java File Wont compile

2001-07-03 Thread Peter Alfors

That is the correct package...  Where do you have your struts jar?

Pete

Chuck Amadi wrote:

 Hi, pls can some one confirm the package name for ActionMappings as i
 recieve the following error.

 I am aware that i have the incorrect package thus were does ActionMappings
 reside.
 Cheers Chuck

 WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found
 in type declaration or import.
 import org.apache.struts.action.ActionMapping;

 ^
 WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in
 type declaration or import.
 import org.apache.struts.action.ActionForm;
 ^
 WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found in
 type declaration or import.
 import org.apache.struts.action.ActionErrors;
 ^
 WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in
 type declaration or import.
 import org.apache.struts.action.ActionError;
 ^
 WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in
 type declaration or import.
 public final class LogonForm extends ActionForm {
  ^
 WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found
 in type declaration or import.
 public void reset(ActionMapping mapping, HttpServletRequest request) {
   ^
 WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found
 in type declaration or import.
 public ActionErrors validate(ActionMapping mapping,
^
 WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found
 in type declaration or import.
 public ActionErrors validate(ActionMapping mapping,
  ^
 8 errors
 Errors compiling LogonForm.

 Chuck Amadi wrote:

  Hi, pls could anyone confirm the ActionMappings package  ActionForward
  package name within WBE-INF\classes\. dir as im lead to believe this
  might be the cause of my problems.
 
  Chuck Amadi wrote:
 
  Part 1.1Type: Plain Text (text/plain)
  Encoding: 8bit
 
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.
  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal  rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: SV: pls Help Invalid Package Declartions .java File Wont compile

2001-07-03 Thread Peter Alfors

Are you looking for the ActionMapping class file or java file?
either way, it should be in your download of struts???

Pete

Chuck Amadi wrote:

 Hi yes all my jar files are in WEB-INf\lib.Could you post a snippet of
 ActionMappings.class.
 As i have located a copy in the struts-example in another application albeit i
 can't access it.
 Cheers Chuck

 Calvin Yu wrote:

  Is struts.jar in WEB-INF/lib?  If so, check to make sure
  ActionMappings.class is in it.  The package name is correct, its just that
  javac cannot find the struts.jar.
 
  Calvin
 
  - Original Message -
  From: Chuck Amadi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 03, 2001 9:13 AM
  Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont
  compile
 
   Hi, pls can some one confirm the package name for ActionMappings as i
   recieve the following error.
  
   I am aware that i have the incorrect package thus were does ActionMappings
   reside.
   Cheers Chuck
  
   WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found
   in type declaration or import.
   import org.apache.struts.action.ActionMapping;
   ^
   WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in
   type declaration or import.
   import org.apache.struts.action.ActionForm;
   ^
   WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found
  in
   type declaration or import.
   import org.apache.struts.action.ActionErrors;
   ^
   WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in
   type declaration or import.
   import org.apache.struts.action.ActionError;
   ^
   WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in
   type declaration or import.
   public final class LogonForm extends ActionForm {
^
   WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found
   in type declaration or import.
   public void reset(ActionMapping mapping, HttpServletRequest request) {
 ^
   WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found
   in type declaration or import.
   public ActionErrors validate(ActionMapping mapping,
  ^
   WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found
   in type declaration or import.
   public ActionErrors validate(ActionMapping mapping,
^
   8 errors
   Errors compiling LogonForm.
  
   Chuck Amadi wrote:
  
Hi, pls could anyone confirm the ActionMappings package  ActionForward
package name within WBE-INF\classes\. dir as im lead to believe this
might be the cause of my problems.
   
Chuck Amadi wrote:
   
Part 1.1Type: Plain Text (text/plain)
Encoding: 8bit
   
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
  
   --
   The views expressed by the sender of this message don't
   necessarily represent those of Brecon Beacons National Park
   Authority. This message is intended for the addressee(s) only
   and is sent in confidence; if you receive it in error, please can you
   let us know (at [EMAIL PROTECTED]) and then destroy all copies.
   Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
   adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
   Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
   yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
   mewn camgymeriad, a fyddech gystal  rhoi gwybod i
   ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
  

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â 

Re: SV: pls Help Invalid Package Declartions .java File Wont compile

2001-07-03 Thread Peter Alfors

Ahh... I think I see what you are trying to do.
You have your own modified version of the AcitonMappings class.
If you want to add classes to the web-inf/classes directory, then you will need to
add the appropriate directory structure
that corresponds to the package.  Therefore, make an
web-inf/classes/org/apache/struts/action directory and place your ActionMapping
class in it.

HTH,
Pete

Chuck Amadi wrote:

 Hi does explain anything that can be digestable and config my .java files
 problems as i am aware that i have declared the right package path. except for
 ActionMappings.class thus any suggstions.
 I have inc a visual of the problem.

 Cheers all

 Calvin Yu wrote:

  Is struts.jar in WEB-INF/lib?  If so, check to make sure
  ActionMappings.class is in it.  The package name is correct, its just that
  javac cannot find the struts.jar.
 
  Calvin
 
  - Original Message -
  From: Chuck Amadi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, July 03, 2001 9:13 AM
  Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont
  compile
 
   Hi, pls can some one confirm the package name for ActionMappings as i
   recieve the following error.
  
   I am aware that i have the incorrect package thus were does ActionMappings
   reside.
   Cheers Chuck
  
   WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found
   in type declaration or import.
   import org.apache.struts.action.ActionMapping;
   ^
   WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in
   type declaration or import.
   import org.apache.struts.action.ActionForm;
   ^
   WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found
  in
   type declaration or import.
   import org.apache.struts.action.ActionErrors;
   ^
   WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in
   type declaration or import.
   import org.apache.struts.action.ActionError;
   ^
   WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in
   type declaration or import.
   public final class LogonForm extends ActionForm {
^
   WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found
   in type declaration or import.
   public void reset(ActionMapping mapping, HttpServletRequest request) {
 ^
   WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found
   in type declaration or import.
   public ActionErrors validate(ActionMapping mapping,
  ^
   WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found
   in type declaration or import.
   public ActionErrors validate(ActionMapping mapping,
^
   8 errors
   Errors compiling LogonForm.
  
   Chuck Amadi wrote:
  
Hi, pls could anyone confirm the ActionMappings package  ActionForward
package name within WBE-INF\classes\. dir as im lead to believe this
might be the cause of my problems.
   
Chuck Amadi wrote:
   
Part 1.1Type: Plain Text (text/plain)
Encoding: 8bit
   
--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at [EMAIL PROTECTED]) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal  rhoi gwybod i
ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
  
   --
   The views expressed by the sender of this message don't
   necessarily represent those of Brecon Beacons National Park
   Authority. This message is intended for the addressee(s) only
   and is sent in confidence; if you receive it in error, please can you
   let us know (at [EMAIL PROTECTED]) and then destroy all copies.
   Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
   adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
   Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
   yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
   mewn camgymeriad, a fyddech gystal  rhoi gwybod i
   ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
  

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then 

Re: proposal: splitting struts mailing list

2001-07-02 Thread Peter Alfors

The problem with splitting into two lists is that the advanced users will
not be around to answer the beginner questions.
I agree that there is a lot of traffic on this list, both beginner and
advanced.  I see it as a benefit though.
The beginners get to learn from the advanced, and the advanced (developers)
get to see the typical types of questions that are asked.  This may then
lead to a better design, or better documentation, etc.

Just my two cents.   :)

Pete


Norman Timmler wrote:

 hi,

 the daily mails in this mailinglist incrased a lot past the last month.
 what do you think about to split the mailinglist into two. eg. into a
 beginner and advanced one.

 perhaps this could fit everybodys needs.

 norman

 . . . . . . . . . . . . . . . . . . . . . . . . .

 Norman Timmler
 application developer

 neteye GmbH
 Alsterchaussee 3
 20149 Hamburg
 Tel +49-(0)40 85 40 26 -40
 Fax +49-(0)40 85 40 26 -10
 [EMAIL PROTECTED]
 http://neteye.de




Re: Strange Problem using JavaScript and HTML:Submit Tag

2001-06-29 Thread Peter Alfors

The html:submit tag sets the submit name to submit.

JavaScript gets confused when an object (your submit button) has the same name as a 
javascript method you are trying to call.

If you set the submit name to something else, like btnSubmit, it will work fine.

HTH,
Pete



[EMAIL PROTECTED] wrote:

 Hi All,

 I have encountered the strange problem when I used Javascript to submit the
 form.

 1. In my case, I have one hyperlink namely Add Employee, when user clicks that
 hyperlink, I use Javacript for setting the value of one hidden variable and to
 submit the form subsequently.

 2. In the same page, I also used Struts (html:submit ) tag for showing  submit
 button.

 The combination of 1 and 2 gives me JavaScript error, like  Object doesn't
 support this property.

 If I avoid Struts(html:submit) tag and use normal HTML (input type=button) tag
 for showing button things work fine for me.
 Mean I don't get JavaScript error.

 Can anybody tell me how to overcome this situation??

 


 Regards,
 Sandeep




Re: Custom tag question

2001-06-29 Thread Peter Alfors

If your question is just - Is it possible?  Then the answer is Yes.
However, if you are asking for the current tags to implement this, that is a
totally separate question.  That would take some re-work.

Pete

Aapo Laakkonen wrote:

 Is it possible to have custom tags that can have both child elements and
 attributes? I mean that in some cases it would be more elegant to use
 elements instead of attributes:

 bean:message key=text.welcome
 arg0bean:write name=un property=firstname//arg0
 arg1bean:write name=un property=firstname//arg1
 /bean:message

 or:

 bean:message
 keytext.welcome/key
 arg0bean:write name=un property=firstname//arg0
 arg1bean:write name=un property=firstname//arg1
 /bean:message

 instead of this:

 bean:message key=text.welcome
 arg0=% = un.firstname %
 arg1=% = un.lastname %
 /bean:message

 Or it would be even more flexible if you could use both of them (at the same
 time).
 This was just an example and at least I have found many places where I'd
 like to
 use child elements instead of attributes.

 Or is it just me who thinks that those runtime expressions are pretty ugly?

 -- Aapo Laakkonen, +358 (50) 33 99 682, ProjectCast Ltd, Helsinki, Finland.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: relaying attribute in request objects

2001-06-28 Thread Peter Alfors

A request's life cycle is over when the page is created.  Therefore, you
cannot pass information using the request (back to the server)  You could do
this:

The action class sets the date in the request for the page to retrieve.
The page turns around and places it in either a hidden field, or as a
querystring of a hyperlink that calls the action again.
The action may then retrieve the information from the hidden field, or
querystring.
This way, you do not need to use the session.

HTH,
Pete

Tom Miller wrote:

 I want to pass a date string back and forth from my Action class and its
 jsp page. The date increments, the page forwards to itself (via the same
 Action), and is redrawn with a new list based on the updated date. At
 the moment, I'm storing the date string in the form as a session object.

 Is it possible to do this with request attributes instead? Can I set a
 request attribute in the Action class and retrieve it again in the next
 call to the Action? I can see how to get/set the attribute in the
 Action, but something must need to be done in the jsp to pass the date
 along in the next request, because the attribute comes up null in my
 Action.

 I'd appreciate any tips.

 --
 Tom Miller
 Miller Associates, Inc.
 [EMAIL PROTECTED]
 641.469.3535 Phone
 413.581.6326 FAX


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Generic handling of properties

2001-06-28 Thread Peter Alfors

try:

http://www.mail-archive.com/



Gangadharappa, Kiran wrote:

 Hi Niall,
 I am kind of new to this mailing list. Any idea where I can find the
 archives?
 regards
 Kiran

 -Original Message-
 From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 28, 2001 4:08 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Generic handling of properties

 Wait for dynamic properties to arrive in Struts (might be a while) or do it
 yourself.

 There are messages in the archive discussing how people have done this.

 Niall

  -Original Message-
  From: Gangadharappa, Kiran [mailto:[EMAIL PROTECTED]]
  Sent: 28 June 2001 00:52
  To: '[EMAIL PROTECTED]'
  Subject: Generic handling of properties
 
 
  hi,
  In my application contents of the Form are database driven. Is there
  anyway I could use Struts here?
  What I mean is I can not pre-define a custom Form class since getter and
  setters are not completely known initially.
  Any ideas?
  Regards
  Kiran
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: multiple form fields

2001-06-28 Thread Peter Alfors

Your page:

...
INPUT type=text name=qty value=1
INPUT type=text name=qty value=2
INPUT type=text name=qty value=3
...

In your class:

String[] qtys = request.getParameterValues(qty);


HTH,
Pete

Paul Beer wrote:

 could someone please send some sample code of sending multiple text fields
 of the same name to a form bean ?  i looked through the mail archives and
 see many threads involving this issue and no clear solution .  how do i have
 a form bean represent multiple items (a string array in servlet land)
 without numbering the input fields item#i# item2 etc . ?  i have tried
 passing multiple input fields but struts does not seem to pick up that the
 multiple input fields are an array of values instead of one single value.
 please send sample code.

 i know this is simple but it is annoying me.  if someone has answered this
 previously please send a link to a good thread where this is resolved.

 thanx.

 -paul


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Is struts really loading the resources?

2001-06-27 Thread Peter Alfors

You could subclass the ActionServlet and over-ride the initApplication() method.
This is the method that loads the file.
You could then display the file, and its contents if you wanted.  (maybe use a
debug setting to specify if you want this to happen?)
Or, you could write a simple class that pulls the value Action.MESSAGES_KEY out
of the session.
If it exists, then you could cycle through it and display its contents.

Pete


Bob Byron wrote:

 I have verified that, and it is:
 init-param
   param-nameapplication/param-name
   param-valueApplicationResources/param-value
 /init-param

 As I read it, that should go to the base directory
 where all classes are stored, and not traverse down to
 a specific package.  In other words, I have placed
 ApplicationResources.properties at the same level as
 the test directory that I mentioned earlier.
 Really, I would like to know if there is a place in
 the code that I can debug and print out the exact file
 name that the system is attempting to open.  Is there
 any way to have Win2000 display a log of files as it
 opens them?

 Bob

 --- Jason Rosenblum [EMAIL PROTECTED] wrote:
  make sure your web.xml file points to the
  ApplicationResources file that you're using.
  the entry looks like this:
init-param
param-nameapplication/param-name
 
 
 param-valuecom.cnet.app.intranet.app.psr.ApplicationResources/param-value
  /init-param
 
  ~Jason
 
  -Original Message-
  From: Bob Byron [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 27, 2001 10:24 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Is struts really loading the resources?
 
 
  Yes, I did.  It has it in there.
 
  Bob
  --- Marcel  Andres [EMAIL PROTECTED] wrote:
   Bob,
  
   Did you make sure, that your jsp-page has the
   following entry, so it can use the
   bean:message-tag:
  
   %@ page language=java %
   %@ taglib uri=/WEB-INF/struts-bean.tld
   prefix=bean %
  
   Marcel
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 27, 2001 5:17 PM
   To: [EMAIL PROTECTED]
   Subject: Is struts really loading the resources?
  
  
   I am new to struts and trying to get down some of
   the
   basics.  I am trying to use the command:
   bean:message key=header.title/
  
   When I do, I get the following exception:
   javax.servlet.jsp.JspException: Missing message
  for
   key header.title
  
   I have verified that my ApplicationResources file
   does
   contain:
   header.title=MY TEST
  
   Checking the log earlier, I find the following
   confirmation that the ApplicationResources
   properties
   were loaded, or were they:
   2001-06-27 09:20:31 - path=/test :action:
  Loading
   application resources from resource
   ApplicationResources
  
   The previous log entry mentions nothing about the
   resource file being found and loaded successfully.
 
   Am
   I missing something?  How do I know that they
   properties file was definately loaded?  How can I
   view
   the properties that are currently available?  I am
   just not sure what avenue of debugging to pursue
  at
   this point.
  
   Thank You,
   Bob Byron
  
  
  
   __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo! Mail
   http://personal.mail.yahoo.com/
 
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Dynamic Value (Scriptlet) in ApplicationResources.properties

2001-06-26 Thread Peter Alfors

try:

html:img src='%=staticPathCommon + /images/required.gif + %' width=10
   height=12 align=absmiddle alt=Required Field Image /

As for the alt attribute, it looks at though the html:img taglib will only
accept either a string or a resource bundle key.
Since you cannot nest taglibs (use  a taglib as an attribute for another) you
would need to retrieve the alt message from your bean, place it in a scriptlet
variable, and then use the variable in the taglib...


HTH,
   Pete


Matt Raible wrote:

 Please respond to me at [EMAIL PROTECTED] as I am not subscribed to this
 list.  Thanks.

 Is it possible to get the alt value of an html:img element from the
 message bean?  For instance:

 html:img src=%=staticPathCommon%/images/required.gif width=10
 height=12 align=absmiddle alt=bean:message
 key=required.image.alt/ /

 - Original Message -
 From: Matt Raible [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 26, 2001 7:08 AM
 Subject: Dynamic Value (Scriptlet) in ApplicationResources.properties

  Please respond to me at [EMAIL PROTECTED] as I am not subscribed to
 this
  list.  Thanks.
 
 
  Is it possible to place a dynamic element in my
  ApplicationResources.properties?
 
  For instance,
 
  required.image = img src=%=staticPathCommon%/images/required.gif
  width=10 height=12 align=absmiddle
 
  In my jsp page, I try to get this value using bean:message
  key=required.image/, but the value comes back as
 
  img src=%=staticPathCommon%/images/required.gif width=10
 height=12
  align=absmiddle
 
  If this is not possible, how do I make the tag below work with a scriplet
  value?  Right now, I get an error trying to parse it.
 
  html:img src=%=staticPathCommon%/images/required.gif width=10
 height=12 align=absmiddle alt=Required Field Image /
 
 
 

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


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: How to submit a form using usemap

2001-06-26 Thread Peter Alfors

Clicking a hyperlink does not submit a form.  Fields within a form are
only passed through the request when the form is submitted.  Therefore,
you need to have your image hyperlink submit the form.
You can do this using javascript.  Check the archives, there are many
messages about this.

Pete


Eda Srinivasareddy wrote:

  Hi

 I have a big image with different mapping areas. In that I have one
 'go' mapping area by clicking which, I should submit the form. I could
 receive only null values into the ActionForm which does mean that the
 values are not being submitted.Could u please help!

 Have a nice time.

 Eda


 ---
 Do You Yahoo!?
 Yahoo! Mail Personal Address - Get email at your own domain with
 Yahoo! Mail.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Internationalization

2001-06-26 Thread Peter Alfors

The ActionServlet class stores the users locale (retrieved from the browser) during
the first request.
(see ProcessLocale() method)
It is stored in the user's session under the key: Action.LOCALE_KEY  -- member
variable of Action class.

Therefore, to change the locale, you need to change the value stored in this session
attribute.
Or, the message tags also allow a you to pass an attribute key that stores the
locale you want to use.

If you want the user to be able to switch locales on the fly (from the browser
settings), then you will need to over-ride the
processLocale() method to store it for each request.  We do this for demo
purposes...
Otherwise, the user may close his browser, and restart with a new locale.

HTH,
Pete

[EMAIL PROTECTED] wrote:

 I am learning the struct architecture. I want to use the internationalization in
 my application. I have seen the example application that is currently using the
 internationalization. I want to change the locale of the application. Which are
 the points in the architecture I have to change to use the different locale.
 I have tried but unable to change. I will be thanful to you if anyone solve my
 problem.
 Vinay.


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: How can I pass extra information on Submit button?

2001-06-26 Thread Peter Alfors

try this:

html:hidden name=geoEntityForm property=recordId
value=%=element.id%/

If you want to create a bean on the jsp page (???), then you will need to place
it in the session before leaving the page so that the servlet is able to
retrieve it later.

HTH,
Pete

Jerzy Kalat wrote:

 Hi Guys,

 I am still fighting with this issue :-(

 I have another question. How can I set value of hidden field to another
 property.
 As in following code, instead of value of element.id all I see in servlet is
 string 'element.id' :

 table border=1
 logic:iterate id=element type=myApp.common.GeoEntity
  name=%= Constants.GEO_ENTITY_LIST %
  tr
 td
 html:submit property=action value=Details/
 html:hidden name=geoEntityForm property=recordId
 value=element.id/
/html:submit
/td
td
 bean:write name=element property=name/
/td
  /tr
 /logic:iterate
 /table

 And another question. If I want to create on JSP page new bean, how can I
 access it in servlet?

 Thanks
 JK

 - Original Message -
 From: David Winterfeldt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 3:39 PM
 Subject: Re: How can I pass extra information on Submit button?

  I haven't done this, but you might be able to do one
  of these two things.  You could try using JavaScript
  to change the value of the action and add the params
  dynamically or each detail button would be a separate
  form.
 
  html:form action=registration
  name=registrationForm
  html:submit property=action value=Details
 
  onclick=document.form[0].action=registration.do?id=12/
 
 
  The action will be processed correctly, but since it
  can't automatically look the corresponding form bean
  you need to specify it with the name attribute.  I
  think this should work.
  html:form action=registration.do?id=12
  name=registrationForm
 html:submit property=action value=Details/
  /html:form
 
  David
 
  --- Jerzy Kalat [EMAIL PROTECTED] wrote:
   Thanks,
  
   Well, I know about this solution, but they insist on
   button.
  
  
   - Original Message -
   From: Peter Alfors [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, June 25, 2001 3:18 PM
   Subject: Re: How can I pass extra information on
   Submit button?
  
  
You could use a link rather than the submit
   button.
Then when you iterate through your result-set, you
   just add the 'id' to
the link.
   
Pete
   
   
Jerzy Kalat wrote:
   
 Hi, I list many records on the form. Each record
   has 'Details' submit
 button, which suppose to flip form from
   'List'mode to 'Details' mode,
 where only 1 record is visible with all it
   fields. On my jsp page I
 have:  logic:iterate id=element
   type=myApp.common.GeoEntity
 name=%= Constants.GEO_ENTITY_LIST %
  table
 tr
 td
 html:submit property=action value=
   Details   %! WHAT
 SHOULD I PUT HERE TO PASS PROPERTY 'id' into
   FORM BEAN 'position'?
 %/html:submit
 /td
   tdbean:write name=element
   property=id//td
   tdbean:write name=element
   property=name//td
 /tr
  /table
 /logic:iterate  I tried different things here
   but it does not work,
 or produce error. Any hints how to do it, or is
   there better way to
 approach it? Thanks in advance, JK
   
  
 
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Formless actions?

2001-06-25 Thread Peter Alfors

The name attribute is not required.
You can leave it out, however, if you are using the html:form taglib on
your page, then
it will want an actionform.  So in that case, you will either need to have
an empty bean, or use the standard HTML FORM tag -- without a bean.

HTH,
Pete


Kief Morris wrote:

 I'm making my first Struts application, and in keeping with MVC
 I want to load all of my JSP pages through actions: the Action sets
 up the data the JSP page needs to display.

 It seems that the action tag in struts-config.xml requires a form
 bean for the name= attribute. But what if I have a view which is not
 a form, merely a view of data? A form bean shouldn't be necessary
 for this, so how do I structure this?

 Kief


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: How can I pass extra information on Submit button?

2001-06-25 Thread Peter Alfors

You could use a link rather than the submit button.
Then when you iterate through your result-set, you just add the 'id' to
the link.

Pete


Jerzy Kalat wrote:

 Hi, I list many records on the form. Each record has 'Details' submit
 button, which suppose to flip form from 'List'mode to 'Details' mode,
 where only 1 record is visible with all it fields. On my jsp page I
 have:  logic:iterate id=element type=myApp.common.GeoEntity
 name=%= Constants.GEO_ENTITY_LIST %
  table
 tr
 td
 html:submit property=action value= Details   %! WHAT
 SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'?
 %/html:submit
 /td
   tdbean:write name=element property=id//td
   tdbean:write name=element property=name//td
 /tr
  /table
 /logic:iterate  I tried different things here but it does not work,
 or produce error. Any hints how to do it, or is there better way to
 approach it? Thanks in advance, JK


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: How can I pass extra information on Submit button?

2001-06-25 Thread Peter Alfors

Are you going to place a button next to each record in the list?


Jerzy Kalat wrote:

 Thanks,

 Well, I know about this solution, but they insist on button.

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 3:18 PM
 Subject: Re: How can I pass extra information on Submit button?

  You could use a link rather than the submit button.
  Then when you iterate through your result-set, you just add the 'id' to
  the link.
 
  Pete
 
 
  Jerzy Kalat wrote:
 
   Hi, I list many records on the form. Each record has 'Details' submit
   button, which suppose to flip form from 'List'mode to 'Details' mode,
   where only 1 record is visible with all it fields. On my jsp page I
   have:  logic:iterate id=element type=myApp.common.GeoEntity
   name=%= Constants.GEO_ENTITY_LIST %
table
   tr
   td
   html:submit property=action value= Details   %! WHAT
   SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'?
   %/html:submit
   /td
 tdbean:write name=element property=id//td
 tdbean:write name=element property=name//td
   /tr
/table
   /logic:iterate  I tried different things here but it does not work,
   or produce error. Any hints how to do it, or is there better way to
   approach it? Thanks in advance, JK
 




Re: How can I pass extra information on Submit button?

2001-06-25 Thread Peter Alfors


You could place the id in the name of the submit button...  Then the action
could parse the name of the submit button that was pressed for the id
There must be a better method than this... But I have not come across this
before, and that is what popped in my head.

Or.. If you can use javascript, you can set the form action (with the id) and
submit the form with a simple javascript call.
However, you must be able to gaurentee that all users will have javascript
enabled.
We do this... (But we are able to force our users to enable javascript)

Pete


Jerzy Kalat wrote:

 Yes, you can see it already in my piece of code, the first td

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 25, 2001 3:24 PM
 Subject: Re: How can I pass extra information on Submit button?

  Are you going to place a button next to each record in the list?
 
 
  Jerzy Kalat wrote:
 
   Thanks,
  
   Well, I know about this solution, but they insist on button.
  
   - Original Message -
   From: Peter Alfors [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, June 25, 2001 3:18 PM
   Subject: Re: How can I pass extra information on Submit button?
  
You could use a link rather than the submit button.
Then when you iterate through your result-set, you just add the 'id'
 to
the link.
   
Pete
   
   
Jerzy Kalat wrote:
   
 Hi, I list many records on the form. Each record has 'Details'
 submit
 button, which suppose to flip form from 'List'mode to 'Details'
 mode,
 where only 1 record is visible with all it fields. On my jsp page I
 have:  logic:iterate id=element type=myApp.common.GeoEntity
 name=%= Constants.GEO_ENTITY_LIST %
  table
 tr
 td
 html:submit property=action value= Details   %! WHAT
 SHOULD I PUT HERE TO PASS PROPERTY 'id' into FORM BEAN 'position'?
 %/html:submit
 /td
   tdbean:write name=element property=id//td
   tdbean:write name=element property=name//td
 /tr
  /table
 /logic:iterate  I tried different things here but it does not
 work,
 or produce error. Any hints how to do it, or is there better way to
 approach it? Thanks in advance, JK
   
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/images/common/logo_top_right.gif;
adr:;;
version:2.1
end:vcard



Re: Dynamic label

2001-06-22 Thread Peter Alfors

try

bean:message key='%= myBean.getLabel() + .label.header %' /

HTH,
Pete


Pal, Gaurav wrote:

 Hi,

 I am trying to create a dynamic label HTML form through the bean:message
 tag. What I want to do is as follows:

 bean:message key=%= myBean.getLabel() %.label.header /

 It gives a compilation error that the key string is unenclosed, anybody have
 any ideas how to do this?

 Thanks in advance for your help,
 Gaurav




Re: No ActionForm Bean Required

2001-06-19 Thread Peter Alfors

Are you using the html:form tag?
It looks as though that tag requires that you have a bean associated
with the form.
I am using struts 1.0 beta 3 (so maybe this is different in the 1.0
release) but, the form tag
trys to retrieve a bean from the pageContext, if it does not find one,
then it attempts to create a new one.
So it looks like you will either need to add a bean, or use a standard
FORM tag.
However, using the FORM HTML tag will forfeit the bonus stuff craig
mentioned below.

HTH,
Pete


Bill Firestone wrote:

  Pete,

 I thank you, but I still get Cannot retrieve definition for form bean
 null.  XML now is:

 action path=/uidstart
 type=com.cisco.nm.uid.struts.action.UidAction
forward name=success path=/engineresult.jsp/
 /action

 I'm sure I'm modifying correct XML file because if I add

 name=FRED

 attribute in action element, then the above error turns into Cannot
 retrieve definition for form bean FRED

 Bill

 At 03:33 PM 6/18/2001 -0500, you wrote:

 try removing the 'scope' and 'validate' attributes.

 Pete



 Bill Firestone wrote:

   All sounds good, but I get the following error:
 
  Error: 500
  Location: /uid/index.jsp
  Internal Servlet Error:
  javax.servlet.ServletException: Cannot retrieve definition for form
  bean null
  at
  
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
 
  at
  
_0002findex_0002ejspindex_jsp_34._jspService(_0002findex_0002ejspindex_jsp_34.java:257)
 
  at
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
 
  at
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 
  at
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 
  at org.apache.tomcat.core.Handler.service(Handler.java:286)
  at
  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 
  at
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 
  at
  org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 
  at
  
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
 
  at
  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 
  at
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 
  at java.lang.Thread.run(Thread.java:484)
  Root cause:
  same as above
 
  struts-config.xml has:
  actionpath=/uidstart
 type=com.cisco.nm.uid.struts.action.UidAction
 scope=request
 validate=false
  forward name=success  path=/engineresult.jsp/
 
  /action
 
  Bill
 
  At 11:00 AM 6/18/2001 -0700, Craig R. McClanahan wrote:
 
 
 
   On Mon, 18 Jun 2001, Peter Alfors wrote:
 
You do not need an ActionForm.  You can read straight from the
   form
parameters in your action class as you mentioned.
   
 
   Yes, you can definitely do this.  Of course, you give up the
   automatic
   stuff that Struts does for you (calling reset(), populating the
   properties, and calling validate()) in this case.
 
Pete
   
 
   Craig
 
 
   
Bill Firestone wrote:
   
 I have hit upon the same problem as this thread, but I didn't
   see a resolution.

 It seems that in Struts 1.0, there must be an ActionForm for
   every page that has a form in it -- or, indeed, an ActionForm for
   every form, including one for each form on a page.

 I had thought that I could have an Action class that would
   read the FORM parameters directly, but that I would not need an
   ActionForm for each screen.

 (One of the goals for Struts 1.1 seems to address this.)

 Is the above correct, or am I missing something?

 Thanks.

 Bill Firestone

 At 03:09 PM 4/30/2001 +0530, Tewathia, Atul wrote:
 I feel there is some problem.
 I tried the same thing but I get the following error on
   console. It shows
 that it is trying to instantiate a form bean corresponding
   to an action
 mapping. And if i am not specifying one it gives an error.
   How do I handle
 this situation when I don't need a form ???
 
 OneForm instantiated
 TwoaeForm instantiated
 TwokeyForm instantiated
 Apr 13, 2001 2:54:59 PM GMT+05:30 Error HTTP
 [WebAppServletContext(446938
 ,threeoseven)] Root cause of ServletException
 javax.servlet.jsp.JspException: Cannot retrieve definition
   for form bean
 null
 at
   org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:725)
 at

   org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441

Re: apostrophe in an application resource properties file does disappear in the JSP file compiled!!!!!!!!!!!

2001-06-19 Thread Peter Alfors

see mail archive:

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

(use two apostrophes)

Pete


Matteo Di Giovinazzo wrote:

 THE ESCAPING \' DOESN'T WORK

 Matteo

 - Original Message -
 From: Mikkel Bruun
 To: '[EMAIL PROTECTED]'
 Sent: Tuesday, June 19, 2001 3:47 PM
 Subject: SV: apostrophe in an application resource properties file does
 disappear in the JSP file compiled!!!
 
 
 escape it using \'
 
 Mikkel




Re: Unsubscribe me...............

2001-06-18 Thread Peter Alfors


goto:
http://jakarta.apache.org/site/mail2.html


Sachin Mapara wrote:

Please unsubscribe me from this list.
Sachin Mapara.
Trigyn
Technologies Ltd.
Tel :- 518 86 86
(O) Ext.- 537

95251 - 44 10 39 (R)


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: No ActionForm Bean Required

2001-06-18 Thread Peter Alfors

You do not need an ActionForm.  You can read straight from the form parameters in your 
action class as you mentioned.

Pete


Bill Firestone wrote:

 I have hit upon the same problem as this thread, but I didn't see a resolution.

 It seems that in Struts 1.0, there must be an ActionForm for every page that has a 
form in it -- or, indeed, an ActionForm for every form, including one for each form 
on a page.

 I had thought that I could have an Action class that would read the FORM parameters 
directly, but that I would not need an ActionForm for each screen.

 (One of the goals for Struts 1.1 seems to address this.)

 Is the above correct, or am I missing something?

 Thanks.

 Bill Firestone

 At 03:09 PM 4/30/2001 +0530, Tewathia, Atul wrote:
 I feel there is some problem.
 I tried the same thing but I get the following error on console. It shows
 that it is trying to instantiate a form bean corresponding to an action
 mapping. And if i am not specifying one it gives an error. How do I handle
 this situation when I don't need a form ???
 
 OneForm instantiated
 TwoaeForm instantiated
 TwokeyForm instantiated
 Apr 13, 2001 2:54:59 PM GMT+05:30 Error HTTP
 [WebAppServletContext(446938
 ,threeoseven)] Root cause of ServletException
 javax.servlet.jsp.JspException: Cannot retrieve definition for form bean
 null
 at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:725)
 at
 org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
 at jsp_servlet._two._jspService(_two.java:345)
 at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
 at
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
 
 the config.xml used by me is here ...
 
 struts-config
   form-beans
 form-bean name=oneForm type=org.apache.struts.myprog.OneForm/
 form-bean name=twokeyForm
 type=org.apache.struts.myprog.TwokeyForm/
 form-bean name=twoaeForm type=org.apache.struts.myprog.TwoaeForm/
   /form-beans
   action-mappings
 action path=/One type=org.apache.struts.myprog.OneAction
 name=oneForm
 forward name=Two path=/Two.jsp /
 /action
 action path=/Twoae type=org.apache.struts.myprog.TwoAction
 name=twoaeForm
 forward name=Three path=/Three.jsp /
 /action
 action path=/Twokey type=org.apache.struts.myprog.TwoAction
 name=twokeyForm
 forward name=Three path=/Three.jsp /
 /action
 action path=/Twoprev type=org.apache.struts.myprog.TwoAction
 forward name=One path=/One.jsp /
 /action
   /action-mappings
 /struts-config
 
 
 -Original Message-
 From: Tobias Meyer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 18, 2001 4:17 PM
 To: [EMAIL PROTECTED]
 Subject: RE: No ActionForm Bean Required
 
 
 Hi Stanley,
 
  Let's say I have a link that allows a user to empty his/her shopping
  cart.  The link to empty the cart points to /empty.do.  I
  do not believe
  this requires an ActionForm bean (PLEASE, correct me if I am
  wrong).  Nonetheless, I have specified an ActionForm Bean
  because it is
  required:
 
   action path=/empty
   type=EmptyAction
   name=buyBean
   scope=request
   forward name=success path=/viewcart.jsp/
   /action
 
  The bean is NOT used and has nothing to do with emptying the shopping
  cart.  Do I just accept that it works?  Or am I designing the program
  wrong?  Please help.
 
 You don't have to specifiy an ActionForm if you don't need one.
 Watch the LogoffAction in the example shipped with struts:
 
 !-- Process a user logoff --
 action path=/logoff
 type=org.apache.struts.example.LogoffAction
 forward name=success  path=/index.jsp/
 /action
 
 Hope this helps,
 
 Tobias Meyer




Re: Struts Mailing list Archive

2001-06-18 Thread Peter Alfors

check out:

http://jakarta.apache.org/site/mail2.html

or to get there, click 'Mailing Lists', then 'here' at the bottom of the
page.


Shaikh, Mehmood wrote:

 Can you post the link to Struts Mailing list archive on struts homepage.

 Thanks




Re: No ActionForm Bean Required

2001-06-18 Thread Peter Alfors


try removing the 'scope' and 'validate' attributes.
Pete


Bill Firestone wrote:
All sounds good, but I get the following error:
Error: 500
Location: /uid/index.jsp
Internal Servlet Error:
javax.servlet.ServletException:
Cannot retrieve definition for form bean null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_34._jspService(_0002findex_0002ejspindex_jsp_34.java:257)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
Root cause:
same as above>
struts-config.xml has:
 action
path="/uidstart"

type="com.cisco.nm.uid.struts.action.UidAction"

scope="request"

validate="false">
 forward
name="success"
path="/engineresult.jsp"/>
 /action>
Bill
At 11:00 AM 6/18/2001 -0700, Craig R. McClanahan wrote:


On Mon, 18 Jun 2001, Peter Alfors wrote:
> You do not need an ActionForm. You can read straight from the
form
> parameters in your action class as you mentioned.
>
Yes, you can definitely do this. Of course, you give up the automatic
stuff that Struts does for you (calling reset(), populating the
properties, and calling validate()) in this case.
> Pete
>
Craig

>
> Bill Firestone wrote:
>
> > I have hit upon the same problem as this thread, but I didn't see
a resolution.
> >
> > It seems that in Struts 1.0, there must be an ActionForm for every
page that has a form in it -- or, indeed, an ActionForm for every form,
including one for each form on a page.
> >
> > I had thought that I could have an Action class that would read
the FORM parameters directly, but that I would not need an ActionForm for
each screen.
> >
> > (One of the goals for Struts 1.1 seems to address this.)
> >
> > Is the above correct, or am I missing something?
> >
> > Thanks.
> >
> > Bill Firestone
> >
> > At 03:09 PM 4/30/2001 +0530, Tewathia, Atul wrote:
> > >I feel there is some problem.
> > >I tried the same thing but I get the following error on console.
It shows
> > >that it is trying to instantiate a form bean corresponding to
an action
> > >mapping. And if i am not specifying one it gives an error. How
do I handle
> > >this situation when I don't need a form ???
> > >
> > >OneForm instantiated
> > >TwoaeForm instantiated
> > >TwokeyForm instantiated
> > >Apr 13, 2001 2:54:59 PM GMT+05:30> Error> HTTP>
> > >[WebAppServletContext(446938
> > >,threeoseven)] Root cause of ServletException
> > >javax.servlet.jsp.JspException: Cannot retrieve definition for
form bean
> > >null
> > > at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:725)
> > > at
> > >org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:441)
> > > at jsp_servlet._two._jspService(_two.java:345)
> > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> > > at
> > >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> > >
> > >the config.xml used by me is here ...
> > >
> > >struts-config>
> > > form-beans>
> > > form-bean name="oneForm" type="org.apache.struts.myprog.OneForm"/>
> > > form-bean name="twokeyForm"
> > >type="org.apache.struts.myprog.TwokeyForm"/>
> > > form-bean name="twoaeForm" type="org.apache.struts.myprog.TwoaeForm"/>
> > > /form-beans>
> > > action-mappings>
> > > action path="/One" type="org.apache.struts.myprog.OneAction"
> > >name="oneForm">
> > > forward name="Two"
path="/Two.jsp

Re: struts-config.xml - How do I open a success path as a new window???

2001-06-15 Thread Peter Alfors

When you say 'return', do you mean you want to close the new window?
Or do you want to open a new link in the original window?
If you just want to close the window, then you can use a javascript command such
as:  window.close()
However, if you want to open a link in the parent window, it is a bit more
tricky.
I wrote a quick test to see if it would work...Here is the code I used:

The parent page:

HTML
  BODY
 form name=test1 id=test1 method=POST target=_blank
action=testOpenerUpdate.html
INPUT type=submit value=test setting window.opener URL
 /form
 a href=javascript:window.open('testOpenerUpdate.html', 'testwindow',
location='yes')test setting window.opener URL/a
  /BODY
/HTML

the child page (testOpenerUpdate.html):

HTML
  HEAD
SCRIPT language=JavaScript
function setOpenerUrl(newUrl)
{
  window.opener.document.location.replace(newUrl);
  window.close();
}
/SCRIPT
  /HEAD
  BODY
FORM name=myForm id=myForm method=POST
   INPUT type=button name=test id=test
onClick=setOpenerUrl('http://www.lycos.com') value=send parent window to
lycos
/FORM
  /BODY
/HTML

It appears that when submitting a form to a target '_blank', that the new window
is not actually a child of the current window.  Therefore, you cannot refer back
to it.  However, if you use a javascript, open() call, then you do create an
actual child.

I know that this is not a complete solution for you, but hopefully it is a step
in the right direction??

Pete

Linnea Ahlbeck wrote:

 Hi Pete!!

 This works, I didn´t know that I could use the target attribute in the
 html:form tag! Thanks! Do you also know how to specify the old window as
 target from the second window , I would like to return to the first window
 when the actions here are done?

 /Linnéa

 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 14, 2001 7:33 PM
 Subject: Re: struts-config.xml - How do I open a success path as a new
 window???

 On Thu, 14 Jun 2001, Peter Alfors wrote:

 
  What happens when you execute this?
 
  td align=lefta class=leftnav href=myAction.do
  target=_blankbean:message key=icon.calendar//td
 
  I would think that this should do what you want??
 

 You can also use the target attribute on an html:form or html:link
 tag:

   td align=left
 html:link styleclass=leftnav page=/myAction.do
target=_blank
   bean:message key=icon.calendar/
 /html:link
   /td

 One advantage to this is that URL rewriting is automatically applied to
 maintain session state even if you're not using cookies.

  Pete
 

 Craig

 
-Original Message-
From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 1:52 AM
To: [EMAIL PROTECTED]
Subject: struts-config.xml - How do I open a success path
as a new window???
  
Hi!!
  
I want to my path
  
forward name=success path=/InsertAddress.jsp/
  
to open the jsp-page as a new window/page ( like the html
tag
  
td align=lefta class=leftnav href=http://./;
target=_blankbean:message key=icon.calendar//td )
  
Any ideas how to do this with struts???
  
Thanks / Linnéa
  
  
  
 




Re: Please confirm css ok from client-side jscript validation

2001-06-14 Thread Peter Alfors

The source (src) attribute should work.  This can be very helpful if you
have common methods that you want to share across multiple pages.

  SCRIPT language=JavaScript
src=/struts-bbnpa/javascript/myJavascriptFile.js/SCRIPT

notice the leading '/' and also, do you have the ending /SCRIPT tag,
this is required as well.

As for the js extension... here is an snippet from HTML: The Definitive
Guide by Oreilly.

The value of the src attribute is the URL of the file containing the
JavaScript program.  The stored file should have a MIME type of
application/x-javascript; but will also be properly handled
automatically by a properly configured server if the filename suffix is
.js.

Looking at my computer, I have the MIME type set.  However, I did not
set this manually.  Either it was a default of windows, or an
application that I loaded added it.

HTH,
Pete

Chuck Amadi wrote:

 Cheers 4 that advice , i did try the javascript declartion and inclued
 the javascript code directly , thus the jsp worked but no javascript
 event.Thus i 'll try  the src (source).
 I have a created a javascript file at the same level as the
 CascadeStyle Sheet - ( /struts-bbnpa / css/ graphics ) thus do i do
 the same i.e ( struts-bbnpa / javascript/ ) and must i add the js
 extension to javascript file when i amend it later within windows.Thus
 shall i create html page with the embeded js code within the js file.

 cheers chuck ( trying  it out )

   SCRIPT language=JavaScript src=myJavascriptFile.js/SCRIPT

 Or include the javascript code directly:

   SCRIPT language=JavaScript
 function myFunct() {}
   /SCRIPT

 and call methods from whichever event you want: onLoad, onClick, etc

 HTH,
 Pete

 Chuck Amadi wrote:

  I have  placed  the CSS file in my struts-bbnpa( named web app)
 and
  not directly in WEB-INF directory. but as follows -
  /struts-bbnpa/css/bbnpa.css same level as WEB-INF
 
  I have used the LINK tag as the href the client's browser should
 not
  be able to access the style sheet. as demonstrated - works fine .
  CHEERS!!
  link rel=stylesheet  href=css/bbnpa.css
  charset=ISO-8859-1
  type=text/css/struts-bbnpa/css/bbnpa.css
  nevertheless how do i embed the javascript within jsp as i had js
  working on my college assignment web-site (a timed window status
  scroll ) albiet wont work on my companies web project. any ideas.
 
  Cheers again chuck
 
 
  --
  The views expressed by the sender of this message don't
  necessarily represent those of Brecon Beacons National Park
  Authority. This message is intended for the addressee(s) only
  and is sent in confidence; if you receive it in error, please can
 you
  let us know (at [EMAIL PROTECTED]) and then destroy all copies.

  Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
  adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
  Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
  yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
  mewn camgymeriad, a fyddech gystal  rhoi gwybod i
  ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi.
 

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts-config.xml - How do I open a success path as a new window???

2001-06-14 Thread Peter Alfors

Your javascript code looks correct.  :)

However, if at all possible, I would avoid using javascript.  Basically,
because the user may have javascript turned off in their browser.

Pete

Abraham Kang wrote:

 Hi Linnea,  I think it would be easier to usea class=leftnav
 href=javascript:window.open('yourAction.do','windowName',
 'status=no')Your action will return mapping.findForward(success)
 to load the popup windows contents.Pete,  my javascript is rusty so if
 you see any errors please correct.--Abraham

  -Original Message-
  From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 13, 2001 1:52 AM
  To: [EMAIL PROTECTED]
  Subject: struts-config.xml - How do I open a success path
  as a new window???

  Hi!!

  I want to my path

  forward name=success path=/InsertAddress.jsp/

  to open the jsp-page as a new window/page ( like the html
  tag

  td align=lefta class=leftnav href=http://./;
  target=_blankbean:message key=icon.calendar//td )

  Any ideas how to do this with struts???

  Thanks / Linnéa





begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Servlet log

2001-06-14 Thread Peter Alfors


In the tomcat/conf/server.xml file, search for:

Logger name=servlet_log
path=logs/servlet.log

Also, the xml file describes the logging options.

Pete

Upadhye, Sujit (GEAE, Foreign National) wrote:

 Hi,

 I have a question regarding servlet log mechanism.

 Where does the servlet.log(String msg, int level) write the message to? Can
 I set the destination in some configuration file? In Tomcat, there is a
 directory users\www\logs. However, this statement apparently does not write
 into it.

 Thanks in advance,

 Sujit




Re: Please confirm css ok from client-side jscript validation

2001-06-13 Thread Peter Alfors

You can either link to a javascript file:

  SCRIPT language=JavaScript src=myJavascriptFile.js/SCRIPT

Or include the javascript code directly:

  SCRIPT language=JavaScript
function myFunct() {}
  /SCRIPT

and call methods from whichever event you want: onLoad, onClick, etc

HTH,
Pete

Chuck Amadi wrote:

 I have  placed  the CSS file in my struts-bbnpa( named web app) and
 not directly in WEB-INF directory. but as follows -
 /struts-bbnpa/css/bbnpa.css same level as WEB-INF

 I have used the LINK tag as the href the client's browser should not
 be able to access the style sheet. as demonstrated - works fine .
 CHEERS!!
 link rel=stylesheet  href=css/bbnpa.css
 charset=ISO-8859-1
 type=text/css/struts-bbnpa/css/bbnpa.css
 nevertheless how do i embed the javascript within jsp as i had js
 working on my college assignment web-site (a timed window status
 scroll ) albiet wont work on my companies web project. any ideas.

 Cheers again chuck


 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.





Re: javascript multiple submit

2001-06-13 Thread Peter Alfors

Looks like javascript does not know the name of your form.
I have not used the html:form tag before, but from looking at the code, it does
not look like having the form named in your
xml document is going to set the form name.  The html:form tag takes an
attribute 'name' that you could set:

html:form name=orderRegularForm action=workOrderRegular

or you could change your javascript to access the form as an index value such
as:

  document.forms[0].action = /dgonline/workOrderSubmit.do;
  document.forms[0].submit();

where 0 = first form defined on your page.

HTH,
Pete

Kiet Nguyen wrote:

 I'm trying to use javascript to submit a form.  The javascrip function get
 called, but the form is not submited (i.e. the ActionClass doesn't execute)
 Here is my jsp.

 .
 script language=JavaScript
 function transmitMessage(msgAction) {
 document.orderRegularForm.action = /dgonline/workOrderSubmit.do;
 document.orderRegularForm.submit(document.orderRegularForm);
 }
 .
 html:form action=workOrderRegular
  a href=#img src=images/submit.gif  onClick=transmitMessage('Submit
 Order')/a
 /htm:form

 ===My config.xml file
 actionpath=/workOrderSubmit

 type=com.dgsystems.dgonline.struts.order.OrderRegularSubmitAction
name=orderRegularForm
 /action




Re: How do make sure that the ActionForward will be on the whole screen

2001-06-13 Thread Peter Alfors

In an anchor:
   A href=myNewPage.html target=_toplink text/A
or in a button (parent frame):
   INPUT name=blah
onClick=javascript:window.parent.document.location.replace('myNewPage.html')

or in a button, uppermost frame (in cases of multiple framesets):
   INPUT name=blah
onClick=javascript:window.top.document.location.replace('myNewPage.html')

-- you will want to check the syntax for the javascript.

HTH,
Pete

Abraham Kang wrote:

  Joyce,I do not think there is a struts way of doing this but you
 could return a page with Javascript in it to reload the parent frame
 of your child frame.You will need to double check my syntax ;^
 )SCRIPT
 language=JavaScriptparent.location.href=%=urlOfAction%;/Script--Abraham

  -Original Message-
  From: Joyce Tang [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 13, 2001 11:20 AM
  To: '[EMAIL PROTECTED]'
  Subject: How do make sure that the ActionForward will be on
  the whole screen

  Here is my problem

  I have a frameset.  There is a button on the bottom frame.
  When the user click on the button, the frameset need to be
  replaced with a non-frameset JSP page.  How should I do
  this?

  Do I do this in the ActionForward?
  Thanks a lot,

  JT



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Generating frameset with PDF

2001-06-12 Thread Peter Alfors

Im not sure if I understand the question fully...
Do you need to create the PDF on the fly?  or just point to existing PDF
files?
Do you have a question on framesets?

If you already have the PDF file, you can display it in your frameset
the same as you would any other HTML, JSP file.
However, the user's browser must be set up to actually view the PDF.  If
the user's browser does not have the plug-in / mime-type set up, then
they will be asked to download the file.  Therefore, you may want to
have a link to the appropriate plug-in.  (that is if you cannot
gaurentee that your users will be set up properly).

Pete

Joyce Tang wrote:



 Dear all,

 I very much need assistant on this issue:
 I have a requirement to generate PDF files on the screen so that the
 user can print.  The number of PDFs are unknown.

 It needs to be a frameset, header will have links to each individual
 PDF,
 so that when you click on the link, the middle frame will be loaded
 with a different PDF.  The footer frame is navigation, continue and
 cancel

 How should I do that?

 Thanks




Re: Can anyone help with solving the BACK button problem, in the browser?

2001-06-07 Thread Peter Alfors

Depending on which browser you use, and the data on the page, the back button
may cause (or ask) the page to reload.
However, some browsers (like IE) only display a snapshot of what the last page
rendered to.
Therefore, you cannot use scriptlets or the action class.  However, you are able
to kick-off javascript.
If you can gaurantee that your users will have javascript enabled, you can write
a simple test to see if this page was already displayed to the user.  You could
check a flag (hidden field) when the page loads.  If the flag is true, then use
the javascript to reload to your desired page.

HTH,
Pete

Dudley Butt@i-Commerce wrote:

 Please help,

 When the user pushes the back button, I want the page to redirect or refresh
 to a different page, please, any ideas?

 Thanx guys and gals
 Dudley


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: How to add .props files to web.xml

2001-06-07 Thread Peter Alfors

Yep... That will work too.  :)

Jonathan wrote:

 why put it in the session when you can put it in the application scope?
 I say this because heavily filled session objects have caused us problems in
 weblogic, and it is really for the application anyway

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 07, 2001 9:56 AM
 Subject: Re: How to add .props files to web.xml

  You do not need to specify the style sheet in the web.xml file.  You can
 just
  point to it in each of your pages.
  However, if you wanted it configurable, you could over-ride
 ActionServlet.init()
  to take in the location of the style sheet and save it as an attribute of
 the
  session.  Then, each of your pages could use the session attribute as the
 link.
  Then, if you decide to change sheets, rename the file, etc, there is only
 one
  place to update.
 
  HTH,
  Pete
 
  kuma.cra wrote:
 
   Hi, maybe off track but nevertheless do i have to map a resource file as
   i want to include a cascade style sheet that my company use on our
   web-site. Thus i have created a resource file beneath
   /WEB-INF/resource/bbnpa.css.
  
   Please point me in the right direction cheers.Chuck
  
   Jon.Ridgway wrote:
   
Hi Manoj,
   
Note the application init-param below. So struts will look in
classes/net/itwa for the resource file in this example running under
 Tomcat.
   
Snip...
   
!-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
   
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valuenet.itwa.ApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
  param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup2/load-on-startup
  /servlet
   
  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
   
Jon.
   
-Original Message-
From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 15:20
To: '[EMAIL PROTECTED]'
Subject: Q: How to add .props files to web.xml
   
Sorry for being a complete newbie, but what is the XML for adding this
 file
to web.xml?
   
ApplicationResources.properties
   
Thanks much,
-Wes
   
-Original Message-
From: Manoj Deb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 10:57 PM
To: [EMAIL PROTECTED]
Subject: RE: More help Plz: Exception thrown processing JSP page...
   
You can keep it in any dir in web tier, but there should be an entry
 in
web.xml.
   
Rgds,
Manoj
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: problem with invoking struts-template!!

2001-06-07 Thread Peter Alfors

I haven't done anything with templates, so this may not be correct.
However, if you are referencing a style sheet in your header (on a
regular page), the link:
/struts-bbnpa/css/bbnpa.css
is a reference from the context, not the WEB-INF directory.
Therefore, you would want to change your link to:
/WEB-INF/struts-template/css/bbnpa.css

However, Im not sure if the template stuff changes this.

HTH,
Pete


Chuck Amadi wrote:

 I have created a index.jsp that has the content of our company
 web-site, thus the index.jsp  is located
 C:\jakarta-tomcat-3.2.1\webapps\struts-bbnpa\index.jsp

 Thus i have set up the tag libraries in the web.xml file and
 referenced the taglib at the top of my index.jsp page as
 below.Nevertheless i recieve a Not Found Error.My struts-template is
 located

 C:\jaka
 ta-tomcat-3.2.1\webapps\struts-bbnpa\WEB-INF\struts-template\css\bbnpa.css

 %@ taglib uri=/WEB-INF/struts-template.tld  prefix=template %


 Not Found (404)

 Original request: /struts-bbnpa/css/bbnpa.css

 Not found request: /struts-bbnpa/css/bbnpa.css

 Any suggestions please .

 --
 The views expressed by the sender of this message don't
 necessarily represent those of Brecon Beacons National Park
 Authority. This message is intended for the addressee(s) only
 and is sent in confidence; if you receive it in error, please can you
 let us know (at [EMAIL PROTECTED]) and then destroy all copies.
 Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
 adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
 Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
 yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
 mewn camgymeriad, a fyddech gystal â rhoi gwybod i
 ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Can anyone help with solving the BACK button problem, in th e browser?

2001-06-07 Thread Peter Alfors

Looks like you can also set the Servlet init param nocache to true,
and struts will automatically set the response headers for you.

Thanks,
Pete

Thane Eisener wrote:



 Oops, I guess I should test before I post. It looks like newer
 browsers don't support this as a META tag only as a header.

 I added the following to one of my action classes and the perform()
 method was called when I pressed 'Back':

 response.addHeader(Pragma,no-cache);
 response.addHeader(Cache-control,no-cache);

 Hope it helps,
 Thane

 -Original Message-
 From: Peter Alfors [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 07, 2001 11:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Can anyone help with solving the BACK button problem,
 in
 th e browser?

 Thane ,

 I am using:
 META http-equiv=Expires content=now
 in my header, and my action is not re-executed when I use the browser
 back button.
 Is there another option I should be using?

 thanks,
 Pete

 Thane Eisener wrote:

 
 
  I seem to recall a META tag called something like pragma-no-cache
 that
  you can embed in your page which will force the page to reload (not
  just display a snapshot). This should enable handling the situation
 in
  scriptlets or your action class.
 
  -Original Message-
  From: Peter Alfors [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 07, 2001 9:52 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Can anyone help with solving the BACK button problem,

  in
  the browser?
 
  Depending on which browser you use, and the data on the page, the
 back
  button
  may cause (or ask) the page to reload.
  However, some browsers (like IE) only display a snapshot of what the

  last page
  rendered to.
  Therefore, you cannot use scriptlets or the action class.  However,
  you are able
  to kick-off javascript.
  If you can gaurantee that your users will have javascript enabled,
 you
  can write
  a simple test to see if this page was already displayed to the user.

  You could
  check a flag (hidden field) when the page loads.  If the flag is
 true,
  then use
  the javascript to reload to your desired page.
 
  HTH,
  Pete
 
  Dudley Butt@i-Commerce wrote:
 
   Please help,
  
   When the user pushes the back button, I want the page to redirect
 or
  refresh
   to a different page, please, any ideas?
  
   Thanx guys and gals
   Dudley




Re: Q: How to add .props files to web.xml

2001-06-06 Thread Peter Alfors

To specify the application resources, you add the following to your web.xml
file...

servlet
...
  init-param
param-nameapplication/param-name
param-valuecom.myResources.ApplicationResources/param-value
  /init-param
...
/servlet

Pete

Wes Bramhall wrote:

 Sorry for being a complete newbie, but what is the XML for adding this file
 to web.xml?

 ApplicationResources.properties

 Thanks much,
 -Wes

 -Original Message-
 From: Manoj Deb [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, June 05, 2001 10:57 PM
 To: [EMAIL PROTECTED]
 Subject: RE: More help Plz: Exception thrown processing JSP page...

 You can keep it in any dir in web tier, but there should be an entry in
 web.xml.

 Rgds,
 Manoj




Re: Action before loading a page

2001-06-05 Thread Peter Alfors

I don't think that you have control of when the frames are loading. The browser
attempts to load both frames simultaneously. (Please correct me if I am wrong)
Therefore, you would have to do something kinda funky (javascript) to instruct
another frame to 'reload' after the current frame finishes.
If you cannot gaurantee that your users have javascript enabled, you will
probably want to avoid it.

A couple of thoughts...

Instead, maybe you could use an action for both frames...  Have them call a
utility class that generates a static ID.
Then each action will be able to share the same ID and perform the desired tasks
using it?
- Or -
Your welcome page could be a single frame that calls an action.  The action
could generate the ID you want, then forward to a frameset page that loads the
JSP page with the drop down list, and the action you mentioned below.

HTH,
Pete


Jack Xu wrote:

 I have a frameset of 2 frames. The first frame loads a JSP file containing a
 custom tag. The tag retrieves a list from my database and displays it as a
 drop down list. The tag then marks the first entry in the list as default
 and then load another file in the second frame. In stead of having a static
 welcome page in the second frame, I'm wondering if there's any way to
 perform this:

 1. The custom tag finishes in the first frame. It puts some kind of ID in
 the session.
 2. Before the second frame loads, a struts action is executed. The action
 retrieves information from my database based on the ID the custom tag put in
 the session, construct a form containing the information returned from the
 database and forwards to the JSP page to be loaded to the second frame. The
 JSP load info from the form so that I have default page with information
 loaded from the database.

 Your help is very much appreciated !

 --
 Jack Xu

 March Networks
 (416)977-7007 x 308
 Email: [EMAIL PROTECTED]
 --


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Resources clarification - is there a work around

2001-05-31 Thread Peter Alfors

We are currently using two different resource bundles.  One for our messages and
another for our constants (that define
web look and feel).  To do this, we overrode the init() method in the
ActionServlet and added another method to initialize a second bundle into a
different session attribute.
This works well for 2 different bundles, but it would not be practical for a
large number or bundles (one per page).

Maybe there would be a way to initialize all of the page bundles at startup?
Some sort of loop or somethine?
I don't have any suggestions on how this would work, but maybe it is a starting
point??

One supporting reason for a single bundle would be this...  It allows you to
easily keep consistent naming across your app.
For instance, if each of your pages has the label Id, but then later on you
(or the customer) decide that Name is a better choice, you only have to change
it in one place.  There are other situations as well, this is just one.
Also, creating new locales is as simple as handing a single resource bundle over
to your translater, rather than 100 different bundles to duplicate.
As for naming problems, there is a simple solution.  Use a naming strategy for
each key.

pageName.Key=Value
or
common.Key=Value -- if this is common across all pages.

HTH,
Pete


Jonathan Asbell wrote:

 Thanks Pete.  However it just seems strange that Struts just offers one big
 resource file for each Local.  I have developed 3 international sites, and I
 can safely say that when a set of resources are associated with a particular
 page it is much easier to manage than 1 resources for all pages.  Has anyone
 hacked at the Struts code to get around this?  I dont like the concatenating
 idea because it is too easy to have duplicates; and you probably want to use
 the same resource names anyway to keep a consistency.  Anyone else have any
 ideas?

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, May 30, 2001 9:33 AM
 Subject: Re: Resources clarification :^)

  You could combine all of your property files during your build.
  This would allow you to have as many different property files as you
  want.
  However, you need to be careful that you do not have duplicate names
  across multiple files.
 
  HTH,
  Pete
 
  Jonathan wrote:
 
   Hello all.  It appears that the ActionServlet points to a resources
   file, and not a ResourceBundle object. Is this true?  The reason is
   that I would like to group in the same directory the following:1) a
   particular ActionForm2) the Action class that works with that
   ActionForm3) the resources (strings) that work with that
   ActionForm The reason is that it is much easier to manage the
   artifacts on a page by page basis.How can I do this
   properly ThanksJonathan
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Resources clarification - is there a work around

2001-05-31 Thread Peter Alfors

One additional thought.   If you find it easier to have a bundle for each page, then
you could combine both ideas.
Use a more defined naming convention, and combine them into one bundle during your
build.


Peter Alfors wrote:

 We are currently using two different resource bundles.  One for our messages and
 another for our constants (that define
 web look and feel).  To do this, we overrode the init() method in the
 ActionServlet and added another method to initialize a second bundle into a
 different session attribute.
 This works well for 2 different bundles, but it would not be practical for a
 large number or bundles (one per page).

 Maybe there would be a way to initialize all of the page bundles at startup?
 Some sort of loop or somethine?
 I don't have any suggestions on how this would work, but maybe it is a starting
 point??

 One supporting reason for a single bundle would be this...  It allows you to
 easily keep consistent naming across your app.
 For instance, if each of your pages has the label Id, but then later on you
 (or the customer) decide that Name is a better choice, you only have to change
 it in one place.  There are other situations as well, this is just one.
 Also, creating new locales is as simple as handing a single resource bundle over
 to your translater, rather than 100 different bundles to duplicate.
 As for naming problems, there is a simple solution.  Use a naming strategy for
 each key.

 pageName.Key=Value
 or
 common.Key=Value -- if this is common across all pages.

 HTH,
 Pete

 Jonathan Asbell wrote:

  Thanks Pete.  However it just seems strange that Struts just offers one big
  resource file for each Local.  I have developed 3 international sites, and I
  can safely say that when a set of resources are associated with a particular
  page it is much easier to manage than 1 resources for all pages.  Has anyone
  hacked at the Struts code to get around this?  I dont like the concatenating
  idea because it is too easy to have duplicates; and you probably want to use
  the same resource names anyway to keep a consistency.  Anyone else have any
  ideas?
 
  - Original Message -
  From: Peter Alfors [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, May 30, 2001 9:33 AM
  Subject: Re: Resources clarification :^)
 
   You could combine all of your property files during your build.
   This would allow you to have as many different property files as you
   want.
   However, you need to be careful that you do not have duplicate names
   across multiple files.
  
   HTH,
   Pete
  
   Jonathan wrote:
  
Hello all.  It appears that the ActionServlet points to a resources
file, and not a ResourceBundle object. Is this true?  The reason is
that I would like to group in the same directory the following:1) a
particular ActionForm2) the Action class that works with that
ActionForm3) the resources (strings) that work with that
ActionForm The reason is that it is much easier to manage the
artifacts on a page by page basis.How can I do this
properly ThanksJonathan
  


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Resources clarification :^)

2001-05-30 Thread Peter Alfors

You could combine all of your property files during your build.
This would allow you to have as many different property files as you
want.
However, you need to be careful that you do not have duplicate names
across multiple files.

HTH,
Pete

Jonathan wrote:

 Hello all.  It appears that the ActionServlet points to a resources
 file, and not a ResourceBundle object. Is this true?  The reason is
 that I would like to group in the same directory the following:1) a
 particular ActionForm2) the Action class that works with that
 ActionForm3) the resources (strings) that work with that
 ActionForm The reason is that it is much easier to manage the
 artifacts on a page by page basis.How can I do this
 properly ThanksJonathan


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Peter Alfors

You sure can.
just use HTML or your own custom tags.

Pete

Sanjay Melinamani wrote:

  hi,
  I am trying to make use of struts framework in our application. But can I
  implement the frame work without using its Tag libraries? If so how can
  I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
  pages.
 
  thanx
  regards
  sanjay
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: dynamic button names

2001-05-24 Thread Peter Alfors

Yep that will work.
I've never used that tag (SubmitTag) before, but now that I look at the code
a little closer. You are right.
Ya learn something new every day.  :)

Pete


Deadman, Hal wrote:

 Isn't this what you want to do?

 html:submitbean:message key=button.login//html:submit

  -Original Message-
  From: Peter Alfors [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 24, 2001 9:39 AM
  To: [EMAIL PROTECTED]
  Subject: Re: dynamic button names
 
 
  It looks as though the ButtonTag and SubmitTag do not allow you to do
  this.
 
  Therefore, you have a few other options.
 
  1.  Use HTML along with the message tag...
 
  INPUT type=submit name=btnSubmit id=btnSubmit
  value=html:message
  key=myBundleKey/
 
  2. Write your own custom tag.  You could extend the SubmitTag and
  over-ride
  the getValue() call to retrieve a resoure bundle key.
 
  3.  Last resort: Retrieve the bundle key through the message resources
  class
  and place it into a script variable.
   Then place the script variable in the custom tag...
   This is ugly, so I would not do this unless you have a
  good reason
  to.
 
  MessageResources bundle =
(MessageResources)
  pageContext.getServletContext().getAttribute(Action.MESSAGES_KEY);
  String myValueRetrievedFromBundle = bundle.getMessage(myKey);
  html:submit property=btnSubmit value=%=
  myValueRetrievedFromBundle
  %/
 
  (The code may not be exactly right.. I have not implemented
  this myself)
 
  HTH,
  Pete
 
 
  Neil Blue wrote:
 
   Hello,
  
   I am planning a struts app and I would like to know please
  if there is
  a
   way to set the text of a submit button, based on a key from the
   ApplicationResources.properties file.
  
   Thank you
  
   Neil Blue
 
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: struts framework without its TAG LIBRARIES in jsp pages how?

2001-05-24 Thread Peter Alfors

when you submit a form, you just need to set the action to the action class
that you want in invoke.
FORM method=post action=myAction.do

If you have your web.xml set up to use the Struts ActionServlet whenever the
desired mapping is encountered, then
you should be fine.

Check out the Struts example application to make sure that your web.xml file is
set up correctly.

HTH,
Pete


Sanjay Melinamani wrote:

 but my question is how? If we use HTML, how is the ActionForm gets
 delegated to Action::perform() method?
 I guess we have to explicitly use the ActionForm bean and call its set
 methods...I am not sure about this !

 If u suggest me as how is the ActionForm will be delegated to the
 Action::perfom method, that would be great !

 thanx
 sanjay

  -Original Message-
  From: Nanduri, Amarnath [SMTP:[EMAIL PROTECTED]]
  Sent: Thursday, May 24, 2001 5:21 AM
  To:   '[EMAIL PROTECTED]'
  Subject:  RE: struts framework without its TAG LIBRARIES in jsp pages
  how?
 
  You can ignore the Tag Libraries and still use the ActionServlet, Actions
  and ActionForms functionality. Write your own html . The beauty of using
  the
  Tag Libraries is that they are fully internationalized. But if
  internationalization is not an issue, then by all means write your own
  html
  without using the Tag Libraries.
 
 
  cheers,
  Amar..
 
  -Original Message-
  From: Sanjay Melinamani [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 23, 2001 7:49 PM
  To: [EMAIL PROTECTED]
  Subject: struts framework without its TAG LIBRARIES in jsp pages how?
 
 
   hi,
   I am trying to make use of struts framework in our application. But can
  I
   implement the frame work without using its Tag libraries? If so how
  can
   I do it? Basically I do not wnat to use Struts TAG LIBRARIES in my JSP
   pages.
  
   thanx
   regards
   sanjay
  


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Suggestion for unsubscribe

2001-05-18 Thread Peter Alfors


You can add a filter on "to or cc" for "struts-user".
Pete
[EMAIL PROTECTED] wrote:
How
about adding a prefix to the subject line as well, such as [Struts User].
Would make it easier to sort my inbox or filter it out so when I go on
vacation I don't come back to 1500 new email messages.Bob
-Original
Message-
From: Ravi Mannem [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001
12:39 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Suggestion for
unsubscribe

I
second that... For sometime I wanted to unsubscribe, but didn't want to
blast it off to the group..

-Original
Message-
From: Lou Farho [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001
8:51 AM
To: Struts
Subject: Suggestion for unsubscribe

I would
like to suggest that every post to this interest group get a footer appended
that gives instructions for unsubscribing. I was a member of another
interest that did this and it did the job.Lou
FarhoCertes
Solutions



begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Visual editing when using tab libraries

2001-05-18 Thread Peter Alfors

PFE is about all you need for HTML editing.  :)

Check the archives for dreamweaver.  I seem to recall a few messages about
this topic.

Pete

Smith, Ryan wrote:

 I would also like to hear any comments people might have on this issue. :)

 -Original Message-
 From: TJM Todd McGregor [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 18, 2001 10:48 AM
 To: '[EMAIL PROTECTED]'
 Subject: Visual editing when using tab libraries

 We are currently using Dreamweaver as our HTML tool. When using the html tag
 library with Struts the form fields don't display, and some of the tags are
 highlighted as errors in Dreamweaver because it does not recognize them. Has
 anybody come across an extension for Dreamweaver that deals with this issue?
 How are the rest of you doing your page development? Are you just using a
 text editor?

 Thanks for your input,

 Todd


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Session management with Struts

2001-05-10 Thread Peter Alfors



Nanduri, Amarnath wrote:


  i have seen a posting on this list a month back where
 somebody has explained that using javascript we can generate a unique id for
 every new web browser that was opened by the user

search the archives for:  The Joy of File

Pete


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Checkbox Arrays

2001-05-10 Thread Peter Alfors

Im not sure how the ActionForm changes things, but without an actionform your
could do this

Each checkbox can have the same name, but a different value.
When the form is submitted, the checkboxes that have been checked are in the
request.
You can use the request.getParameterValues(checkBoxName) to retrieve a string
array of the values for the checked boxes.

HTH,
Pete

Tony Karas wrote:

 Can anyone help with this?

 I have an array of checkboxes in my ActionForm represented by

 boolean[] delete;

 and I have a setter function

 public void setDelete( boolean[] values )
 {
 delete = values;
 }

 The problem is that I have only checkboxes that are checked get sent back -
 so if one checkbox is checked all I get is an array of length 1.  Therefore,
 it is not possible for me to determine which checkbox has been checked.

 In the documentation it tells me to use reset() in ActionForm to initialise
 the values - but this will only work with single checkboxes and not arrays.

 I think I'm stuck.  Is there anyway I can determine which checkbox has been
 checked - maybe I can get the value to differ for each checkbox.  Will look
 in to that.

 Cheers
 Tony


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Checkbox Arrays

2001-05-10 Thread Peter Alfors

Try pulling the bean value out into a script variable.
Taglibs cannot be nested within another taglib as an attribute.


Tony Karas wrote:

 Yeah - I'm looking at that.  My problem now is how to get the value for each
 checkbox.  My bean has an id property - so I have tried this kind of
 thing:

 logic:iterate id=retailer name=retailerForm property=retailers
 tr
 tdhtml:checkbox name=retailer property=delete value=bean:write
 name=retailer property=id///td
 tdbean:write name=retailer property=id//td
 tdhtml:text name=retailer property=name//td
 /tr
 /logic:iterate

 But it doesn't like having the bean:write embedded there.  Am I missing
 something obvious?

 Many thanks
 Tony

 From: Peter Alfors [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: Checkbox Arrays
 Date: Thu, 10 May 2001 11:09:18 -0500
 
 Im not sure how the ActionForm changes things, but without an actionform
 your
 could do this
 
 Each checkbox can have the same name, but a different value.
 When the form is submitted, the checkboxes that have been checked are in
 the
 request.
 You can use the request.getParameterValues(checkBoxName) to retrieve a
 string
 array of the values for the checked boxes.
 
 HTH,
  Pete
 
 Tony Karas wrote:
 
   Can anyone help with this?
  
   I have an array of checkboxes in my ActionForm represented by
  
   boolean[] delete;
  
   and I have a setter function
  
   public void setDelete( boolean[] values )
   {
   delete = values;
   }
  
   The problem is that I have only checkboxes that are checked get sent
 back -
   so if one checkbox is checked all I get is an array of length 1.
 Therefore,
   it is not possible for me to determine which checkbox has been checked.
  
   In the documentation it tells me to use reset() in ActionForm to
 initialise
   the values - but this will only work with single checkboxes and not
 arrays.
  
   I think I'm stuck.  Is there anyway I can determine which checkbox has
 been
   checked - maybe I can get the value to differ for each checkbox.  Will
 look
   in to that.
  
   Cheers
   Tony
  peter.alfors.vcf 

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


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Potential Security Flaw in Struts MVC

2001-05-07 Thread Peter Alfors

Wouldn't the hacker have to get the new form class into the classpath of the
server since all of the code runs server side?



Jeff Trent wrote:

 That is not what my thinking was.  But that could be an issue also.  My
 concern is someone intentionally and maliciously creating a form to supply
 more parameters than originally intented by the developer.  For instance,
 consider the UserForm fields:

 Name(available to enrollment  administrative interface)
 Address(available to enrollment  administrative interface)
 Phone(available to enrollment  administrative interface)
 Email(available to enrollment  administrative interface)
 ApprovedUserFlag(available to administrative interface only)
 AdministrativeUserFlag (available to administrative interface only)

 If a user knows your naming concention, they can write their own form to
 override the administrative-level fields above.

 - Original Message -
 From: Anthony Martin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 07, 2001 11:59 AM
 Subject: RE: Potential Security Flaw in Struts MVC

  Jeff,
 
  Are you asking if book marking a URL that contains query parameters might
 be
  a security risk?
 
 
  Anthony
 
  -Original Message-
  From: Jeff Trent [mailto:[EMAIL PROTECTED]]
  Sent: Monday, May 07, 2001 8:37 AM
  To: [EMAIL PROTECTED]
  Subject: Potential Security Flaw in Struts MVC
 
 
  I may be wrong about this (only been working w/ Struts for a week now).
 But
  I do see a potential security flaw in struts that I would like to hear
 from
  others regarding.
 
  Consider a simple set of struts classes that represent a user in a system.
  You would probably have classes that look something like this:
  User(the model representing the user)
  UserForm(an enrollment form for a new user)
  UserAction(Saves the UserForm information to db, etc)
 
  The User class would have accessors and modifiers like getFirstName(),
  setFirstName(), getAdministrativeUserFlag(), setAdministrativeUserFlag(),
  etc.  The basic implementation of the UserForm is to take the UI form
 data,
  introspect the beans, and call the correct modifier of the UserForm bean
  based on the fields contained within the UI submission/form.  A developer
 of
  course would not expose the Administrative User Flag option on the UI
 for
  enrollment (that would be found possibly in some other
 administrative-level
  module).  However, if someone is familiar with the db schema and the
 naming
  convention the developer used, that user could subvert the application by
  writing his own version of the UI which contains an Administrative User
  Flag field (or any other field for that matter) and the basic form
  processing in Struts will kindly honor the request and set the
  Administrative Flag on the user.  Unless, of course, the developer makes
  special provisions to prevent this behavior.  However, its not entirely
  obvious to the struts user (in my opinion) that this is even a concern.
 Am
  I making sense here?
 
  - jeff
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Potential Security Flaw in Struts MVC

2001-05-07 Thread Peter Alfors

I think I must be missing something...  I don't see how a user/hacker is going
to gain access to the system if one is using security.
If you route each request through a security check (realm) then you should be
able to determine if the current user has access to the requested page/action.

Each task should be a different action, rather than using, say, query string
parameters to define an action.
Then the security realm can authenticate the user before allowing the action to
take place.

The code is being run server side, therefore, users cannot introduce their own
classes to over-ride the current form classes or actions.

Am I missing something?

Thanks,
Pete




Christian Cryder wrote:

 I usually just lurk on this list, but I think I'll pipe in here.

 I think Curt raises a valid point, and it's one of my particular gripes
 about the webapp paradigm (certainly not Struts in general): every action
 that is represented by URL is accessible if you know the right information
 (or can guess it).

 Here's an example. Let's say I have I have servlets (or JSPs, or whatever)
 that do things like HireEmployee, FireEmployee, AdjustWages, PayBonus, etc.
 Based on naming convention, if I have access to some of these functions I
 might very well be able to guess the names of others. So I have to build
 security into each of these functions, to ensure that the user is authorized
 to do the task.

 Now, for a simple app, this may not be too bad: just cut and paste the code
 and you're on your way.  As the application grows in complexity, however
 (either in the number of functions that need to be validated, or the code
 that does the validation, or both), it becomes increasingly easy to
 introduce bugs into the system. The developer might miscode a particular
 security check. Or he might forget to add security for a newly created
 function. If you have a system with hundreds or thousands of secure
 functions, the chances of making errors increases significantly if you are
 duplicating code in all those places, and any mistake results in a security
 hole within your app.

 Now, what are some possible strategies for dealing with this?

 Well, in JSP's you could probably do includes to reuse the same physical
 piece of code, or in Servlets you could delegate to some kind of common
 security function. Neither of these situations solves the scenario however
 where the developer forgets to invoke the proper security measures (maybe
 they're not aware of the proper security for a task, or maybe they just made
 a mistake). The point is that even though you're using includes or calling a
 common authorization method (thereby reducing the amount of lines of
 duplicated code), you are still relying on all of the actions to make the
 call in the first place. If you have a system with hundreds of functions,
 what are the odds that as that systems grows (new functions added, security
 policies modified, etc) mistakes will creep in? Pretty good, in my
 experience. And in the webapp environment such security holes are often more
 accessible to the world at large.

 What if you could define actions as belonging to a particular master class
 of action. In other words, the example functions I gave above might all be a
 subset of MgrActions or something like that? What would really be nice
 would be for actions to be defined hierarchically, and to allow for
 validations/authorization to be performed on a parent. So for instance,
 rather than duplicating specific authorizations for HireEmployee,
 FireEmployee, AdjustWages, PayBonus, it'd be nice to just write the
 authorization code once for MgrActions, and know that it would automatically
 get applied to any of the actions that extend the MgrAction. Then when you
 add new actions, they would automatically inherit the security policies of
 all their parent actions. If you need to modify security policies, you'd
 only have to change the logic in one place.

 I have no idea how you would implement something like this in Struts (or if
 its even possible). In Barracuda, we were able to do this in our event
 model. When client requests come in, they are translated to events, and for
 every event that is dispatched, if that event implements a marker interface
 called Polymorphic, then all the Event's parent events will be dispatched
 first (since, after all, the target event is an instance of each of those
 parent events). This pattern works extremely well for implementing policies
 that apply to portions of an application. As the application evolves, you
 only have to make changes to authorization logic in one place; new actions
 automatically inherit their parents' policies; and if you ever need to add
 new policies (like say logging all the MgrAction events plus all the
 SrMgrAction events), all you have to do is change your event hierarchy and
 add new listener code for the newly defined event. This logic would then
 automatically apply to all events further down the chain.

 Like I 

Re: Potential Security Flaw in Struts MVC

2001-05-07 Thread Peter Alfors

Sure.  You could create a jsp page that had the fields you would like, and even
call off a remote action from your own page.
However, if I route my actions through a security realm, then the requested
action will be denied because the current user is not logged in.  Or.. If the
would be hacker is actualy a valid user on the system and has a
username/passsword, and he trys send his own page (along with additional fields)
it will still be caught by the secuirty realm.
The danger would exist if either form fields, or query string parameters were
being used as an action flag.
If the view, update, add, delete are different actions, then the user will be
required to have a valid login before the action will even be executed.

Pete


Jeff Trent wrote:

 No, I can write a form locaally and have the action run on your server...

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 07, 2001 1:56 PM
 Subject: Re: Potential Security Flaw in Struts MVC

  Wouldn't the hacker have to get the new form class into the classpath of
 the
  server since all of the code runs server side?
 
 
 
  Jeff Trent wrote:
 
   That is not what my thinking was.  But that could be an issue also.  My
   concern is someone intentionally and maliciously creating a form to
 supply
   more parameters than originally intented by the developer.  For
 instance,
   consider the UserForm fields:
  
   Name(available to enrollment  administrative interface)
   Address(available to enrollment  administrative interface)
   Phone(available to enrollment  administrative interface)
   Email(available to enrollment  administrative interface)
   ApprovedUserFlag(available to administrative interface only)
   AdministrativeUserFlag (available to administrative interface only)
  
   If a user knows your naming concention, they can write their own form to
   override the administrative-level fields above.
  
   - Original Message -
   From: Anthony Martin [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, May 07, 2001 11:59 AM
   Subject: RE: Potential Security Flaw in Struts MVC
  
Jeff,
   
Are you asking if book marking a URL that contains query parameters
 might
   be
a security risk?
   
   
Anthony
   
-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 8:37 AM
To: [EMAIL PROTECTED]
Subject: Potential Security Flaw in Struts MVC
   
   
I may be wrong about this (only been working w/ Struts for a week
 now).
   But
I do see a potential security flaw in struts that I would like to hear
   from
others regarding.
   
Consider a simple set of struts classes that represent a user in a
 system.
You would probably have classes that look something like this:
User(the model representing the user)
UserForm(an enrollment form for a new user)
UserAction(Saves the UserForm information to db, etc)
   
The User class would have accessors and modifiers like getFirstName(),
setFirstName(), getAdministrativeUserFlag(),
 setAdministrativeUserFlag(),
etc.  The basic implementation of the UserForm is to take the UI form
   data,
introspect the beans, and call the correct modifier of the UserForm
 bean
based on the fields contained within the UI submission/form.  A
 developer
   of
course would not expose the Administrative User Flag option on the
 UI
   for
enrollment (that would be found possibly in some other
   administrative-level
module).  However, if someone is familiar with the db schema and the
   naming
convention the developer used, that user could subvert the application
 by
writing his own version of the UI which contains an Administrative
 User
Flag field (or any other field for that matter) and the basic form
processing in Struts will kindly honor the request and set the
Administrative Flag on the user.  Unless, of course, the developer
 makes
special provisions to prevent this behavior.  However, its not
 entirely
obvious to the struts user (in my opinion) that this is even a
 concern.
   Am
I making sense here?
   
- jeff
   
 


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Potential Security Flaw in Struts MVC

2001-05-07 Thread Peter Alfors

We are doing something very similar.  We are using the jaas security to map
each action to a permission.
This way, each user is mapped to the actions that he/she is allowed to
perform.
Each request is routed through a security check to verify that the currently
logged in user has permissions to this action.

Pete

Michael Rimov wrote:

 At 12:17 PM 5/7/2001 -0700, you wrote:
 Role-Based Action Execution.
 Add the ability to require the current user to be in a
 particular security role before they can execute a
 particular action.

 I just wanted to pipe in here because we're integrating Struts into our
 stuff (Slowly!) The Expresso Framework http://www.jcorporate.com/ tackled
 this problem by creating a DB Security matrix.  Each action in the
 controller is automatically registered with a security table and the admin
 can declare which user groups can access which action, as well as which
 permissions to access which database tables.  It's done pretty
 transparently to the programmer.

 Hopefully, we'll actually have Struts integrated within the next .1
 release. [People are building bridge classes as I speak], so maybe the
 security model in there can help somebody.
  -Mike


begin:vcard 
n:;
x-mozilla-html:FALSE
org:BRIMG SRC=http://www.irista.com/logo/irista.gif;BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain
adr:;;
version:2.1
end:vcard



Re: Potential Security Flaw in Struts MVC

2001-05-07 Thread Peter Alfors



Jeff Trent wrote:

 True, the security realm validates if the request is legal.  However, if the
 uderlying model objects are shared (User and UserForm objects in my example)
 for both admin and user level forms, then the request could be manipulated
 to set other fields beyond what was exposed for the normal user because
 struts takes each name, value pair in the request and calls the appropriate
 setter in the form for that name.

 Listen, it doesn't really matter.  Its highly unlikely anybody can exploit
 this so I'm going to drop the issue.  I don't want to appear to be a flame
 here.


Actually, I just wanted to make sure that I understood what the possible
security hole was.  :)
Now I understand what you are doing.
We haven't run across this because we haven't implemented any admin screens that
differ from user screens (yet).
Im glad you brought the issue up, because it is something that could be
overlooked.  :)


 - jeff

 - Original Message -
 From: Peter Alfors [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 07, 2001 4:14 PM
 Subject: Re: Potential Security Flaw in Struts MVC

  Sure.  You could create a jsp page that had the fields you would like, and
 even
  call off a remote action from your own page.
  However, if I route my actions through a security realm, then the
 requested
  action will be denied because the current user is not logged in.  Or.. If
 the
  would be hacker is actualy a valid user on the system and has a
  username/passsword, and he trys send his own page (along with additional
 fields)
  it will still be caught by the secuirty realm.
  The danger would exist if either form fields, or query string parameters
 were
  being used as an action flag.
  If the view, update, add, delete are different actions, then the user will
 be
  required to have a valid login before the action will even be executed.
 
  Pete
 
 
  Jeff Trent wrote:
 
   No, I can write a form locaally and have the action run on your
 server...
  
   - Original Message -
   From: Peter Alfors [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, May 07, 2001 1:56 PM
   Subject: Re: Potential Security Flaw in Struts MVC
  
Wouldn't the hacker have to get the new form class into the classpath
 of
   the
server since all of the code runs server side?
   
   
   
Jeff Trent wrote:
   
 That is not what my thinking was.  But that could be an issue also.
 My
 concern is someone intentionally and maliciously creating a form to
   supply
 more parameters than originally intented by the developer.  For
   instance,
 consider the UserForm fields:

 Name(available to enrollment  administrative interface)
 Address(available to enrollment  administrative interface)
 Phone(available to enrollment  administrative interface)
 Email(available to enrollment  administrative interface)
 ApprovedUserFlag(available to administrative interface only)
 AdministrativeUserFlag (available to administrative interface only)

 If a user knows your naming concention, they can write their own
 form to
 override the administrative-level fields above.

 - Original Message -
 From: Anthony Martin [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 07, 2001 11:59 AM
 Subject: RE: Potential Security Flaw in Struts MVC

  Jeff,
 
  Are you asking if book marking a URL that contains query
 parameters
   might
 be
  a security risk?
 
 
  Anthony
 
  -Original Message-
  From: Jeff Trent [mailto:[EMAIL PROTECTED]]
  Sent: Monday, May 07, 2001 8:37 AM
  To: [EMAIL PROTECTED]
  Subject: Potential Security Flaw in Struts MVC
 
 
  I may be wrong about this (only been working w/ Struts for a week
   now).
 But
  I do see a potential security flaw in struts that I would like to
 hear
 from
  others regarding.
 
  Consider a simple set of struts classes that represent a user in a
   system.
  You would probably have classes that look something like this:
  User(the model representing the user)
  UserForm(an enrollment form for a new user)
  UserAction(Saves the UserForm information to db, etc)
 
  The User class would have accessors and modifiers like
 getFirstName(),
  setFirstName(), getAdministrativeUserFlag(),
   setAdministrativeUserFlag(),
  etc.  The basic implementation of the UserForm is to take the UI
 form
 data,
  introspect the beans, and call the correct modifier of the
 UserForm
   bean
  based on the fields contained within the UI submission/form.  A
   developer
 of
  course would not expose the Administrative User Flag option on
 the
   UI
 for
  enrollment (that would be found possibly in some other
 administrative-level
  module).  However, if someone

  1   2   >