Re: struts.jar

2001-04-10 Thread Maya Muchnik

unsubscribe and search over
http://www.mail-archive.com/struts-user@jakarta.apache.org/

Andrew Slack wrote:

 Is there a digest form of this list?  It'd be nice to minimise the traffic
 that's passing through my inbox.  Additionally, is there an URL out there
 where I can search over historical traffic from this list?

 Andrew M Slack




Re: .do mappings not working bean cannot be read by the JSP

2001-04-06 Thread Maya Muchnik

Iraklis,

I will try to help you, but maybe I could not, because, I am almost in the
start stage as you are. The first you need to understand HOW struts-example
works, you can find "A Walk tour .." in the example menu. This tour explains
step by step, what involve and how in struts-example. The second COMPARE your
struts-config.xml and the example. How the example is starting - from
welcome-file-list file, that is index.jsp. And index.jsp is calling logon.jsp
for logon.do action. And so on.

My point is this - you cannot call
http://localhost:7001/myapp/listDirectoryContents.do
directly from a browser, it must be through some start file. Where is your
"welcome.jsp"?

Your do not have an application resource file, maybe it is OK. Because you do
not want to check anything.

The second, Action class is called by ActionServlet, if the servlet is found
that this action must to be performed according to ActionForm submitted through
a request.

Maya

Iraklis Kourtidis wrote

 How are you gentlemen!! Somebody set up me the bomb.

 I have installed Struts OK, and I've even run the 'struts-example'
 application (which means that Struts is working fine with me otherwise.) I'm
 trying to create a small application, but I am having problems.

 When I type
 http://localhost:7001/myapp/listDirectoryContents.do
 in the browser, I get a 'page not found'. If I change 'do' to something else
 (such as "foo"), I get a Error 404--Not Found, which means that at least the
 'action' servlet is called... I am appending my web.xml and
 struts-config.xml: for the life of me I can't spot anything wrong about
 them.

 A second problem that I've wasted my youth on is that my action class adds
 an object (bean, if you wish) to the request or session by the following:

 HttpSession session = request.getSession();
 session.setAttribute("com.covia.struts.folder_contents", di);

 or
 request.setAttribute("com.covia.struts.folder_contents", di);

 (I'm saying 'or' because I've tried both.)

 In my JSP I've used the following line:
 logic:iterate id="aFile" name="com.covia.struts.folder_contents"
 property="fileroomFolders" scope="session"
  ...

 to access this bean, but I get a message saying
 Apr 5, 2001 6:32:56 PM CDT Error HTTP
 [WebAppServletContext(2243896,fileroom_struts)] Root cause of
 ServletException
 javax.servlet.jsp.JspException: Cannot find bean
 com.covia.struts.folder_contents in scope session

 Again, I've tried this using both 'session' and 'request' scope.

 My understanding has been that the action class gets called first. It places
 whatever it needs on the request/session, and then the JSP file that's
 listed in struts-config.xml as its 'input' runs right afterwards. Did I get
 something wrong?

 Infinite thanks to whoever can help me with this! I've already wasted a ton
 of time - to no avail - trying to solve this.
 thanks much,
 Iraklis

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

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

 web-app

   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 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-value0/param-value
 /init-param
 init-param
   param-namevalidate/param-name
   param-valuefalse/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

   !-- The Welcome File List --
   welcome-file-list
 welcome-filewelcome.jsp/welcome-file
   /welcome-file-list

   !-- Struts Tag Library Descriptors --
   taglib
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/struts-bean.tld/taglib-location
   /taglib

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

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

 /web-app

 
 

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

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

 struts-config

   data-sources/

   !-- == Form Bean Definitions
 === --
   form-beans

 !-- Logon form bean --
 form-bean 

Re: Newbie question #2

2001-04-06 Thread Maya Muchnik

Here is the reply from Craig M. for similar question
-
John Hunt wrote:

 1.What is the normal practice in the case where you
 have two pages, and part of the input entered in the
 first page needs to be displayed in the second page. I
 would say use the same form bean for both the pages.
 Any objections to this?


This would also be the normal approach to a multi-page form -- all of
the pages would share the same form bean, whose properties would be all
the fields that appear on *any* of the pages.

The interesting part of this is knowing what to check in your validate()
method, which will be called as each page is submitted.


 2. When displaying readonly contents  on a page where
 the contents were obtained by some processing done by
 the Acton class which forwarded to this page, is it
 advisable to put the output page's bean in session
 scope and have the action class populate it ( or even
 under request scope ). Or is it better to expose many
 beans from the Action class that produced the data and
 let the form bean get populated in the  jsp page ( for
 the readonly attributes )? So these attributes
 actually need not be propagated to the next action
 class. Suggestions???


I would not generally use the form bean for read only attributes --
instead, I'd just create request or session attributes (depending on how
long you wish to keep them) and use bean:write to display the
read-only contents of those beans.  This works even when you are not
inside a form, and you can have any number of beans accessible to
bean:write, but only one form bean per form.

Craig


-
"Nanduri, Amarnath" wrote:

 check the mailing list. Somebody before has asked the same question and got
 a reply back

 -Original Message-
 From: Alex Colic [mailto:[EMAIL PROTECTED]]
 Sent: Friday, April 06, 2001 10:26 AM
 To: Struts
 Subject: Newbie question #2

 Hi, I am porting one of my web apps to the struts infrastructure. I have a
 few questions that should get me on the right track. I hope someone out
 there can help.

 #2 How do you make a text box read-only? I have a form in which the employee
 name is read from the bean. I don't want the user to change that so I want
 to make that text box read-only.

 Regards

 Alex Colic, HBA, B. Ed
 PopWare Inc. "Driving down the cost of conversions!"
 E-Mail: [EMAIL PROTECTED]
 Tel: 1-905-777-8171 ext. 104
 Fax: 1-905-777-0132




Re: struts.jar

2001-04-02 Thread Maya Muchnik

Put it under your_app/WEB-INF/lib. NOT in CLASSPATH, NOT under tomcat/lib
or other dir.

Jesse Vitrone wrote:

 I've know we've been through this before, but can someone refresh me on
 where it's OK to have struts.jar and where it's not OK?

 Thanks,
 Jesse Vitrone




Re: Javascript bean:write question?

2001-04-02 Thread Maya Muchnik

I am not sure, that it is help. Try single quotation symbol after "abc=" as :
var abc = 'bean:write name = "formbean" property="abcde"';

Josh wrote:

 We are using Stuts 1.0 b1, and deploying in both Weblogic 5.1 sp8, and Orion
 1.4.5.  One difference that I don't understand is that in Weblogic we embedded
 bean:write in our javascript, and it worked just fine, however that approach
 does not work in Orion.  I was wondering if anyone had an explanation to this.
 Is it simply that the jsp compiles in a different order?

 For example this works in Weblogic:
 script language='javascript'
 var abc = "bean:write name = "formbean" property="abcde"";
 /script

 However in Orion we have had to work around this problem by defining javascript
 vars and defining them onload of the page.  Not that big of a deal, but I would
 like to understand what is going on.

 Thanks,
 Josh

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




Re: Html Tags support

2001-04-02 Thread Maya Muchnik

Do not download - the documentation is on-line. Maybe they do not match.

Eugene Krivopaltsev wrote:

 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 list-help: mailto:[EMAIL PROTECTED]
 list-unsubscribe: mailto:[EMAIL PROTECTED]
 list-post: mailto:[EMAIL PROTECTED]
 Delivered-To: mailing list [EMAIL PROTECTED]
 Date: Mon, 02 Apr 2001 07:40:20 -0400
 From: Maya Muchnik [EMAIL PROTECTED]
 X-Accept-Language: en
 MIME-Version: 1.0
 To: [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: Html Tags support
 Content-Transfer-Encoding: 7bit
 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N
 
 According to a link http://jakarta.apache.org/struts/struts-html.html or
 http://jakarta.apache.org/struts/api/org/apache/struts/taglib/html/package-summ
 ary.html#package_description
 
 no such things in the documentation.
 
 You have got this message from the link
 http://jakarta.apache.org/struts/tags.html,
 that points to the OLD documentation for 05. release. From
 http://jakarta.apache.org/struts/ it is the link "Old documents". You can read
 them
 ONLY to understand better the struts tags structure, because the latest
 document
 1.0 release does not have all details as the old one has.
 
 Maya
 

 No, I downloaded latest struts (Struts 1.0-beta-1) from apache.org and the file
 (tags.html) is located in jakarta.../web/documentation.

 --eugene

 
 Eugene Krivopaltsev wrote:
 
  Struts team,
 
  I found this phrase today when open html tags documentation:
 
  --
  NOTE: ALL OF THE INFORMATION IN THIS DOCUMENT IS DEPRECATED, AND IS AVAILABLE
 IN
  STRUTS 1.0 ONLY TO
  ASSIST IN THE CONVERSION OF APPLICATIONS BASED ON STRUTS 0.5 TO THE STRUTS
 1.0
  RELEASE. THIS LIBRARY WILL
  BE REMOVED IN FUTURE VERSIONS OF STRUTS.
  -
 
  Could someone comment on it ? It is pretty important to understand could  we
  rely on html tags or not.
 
  Thanks,
  --
  Eugene Krivopaltsev Sun Microsystems, Inc.
  [EMAIL PROTECTED] 901 San Antonio Road
  Voice: 650.786.6260 (x86260)Palo Alto, CA. 94303
  Fax:   650.786.7816 www.sun.com
 

 --
 Eugene Krivopaltsev Sun Microsystems, Inc.
 [EMAIL PROTECTED] 901 San Antonio Road
 Voice: 650.786.6260 (x86260)Palo Alto, CA. 94303
 Fax:   650.786.7816 www.sun.com




Re: Internationalised 'alt' text

2001-03-29 Thread Maya Muchnik

Thank you, Howard. And if this does not work for me, is that meant, because I
am using Tomcat 3.1? In your example below I am using pageKey instead of src.



Howard Moore wrote:

 The html:img tag now contains an altKey attribute that does what you want.

 e.g.

 html:img src="someImage.png" altKey="someImage.alt.text"/

  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: 28 March 2001 21:54
  To: [EMAIL PROTECTED]
  Subject: Re: Internationalised 'alt' text
 
 
  Hi, this is an old email, but not resolved, at least for me.
  Maybe somebody can give
  me a hunt.
  I have tried both suggestions. Both are not working. Maybe I
  am doing something
  wrong.
  Thanks in advance.
  Maya
 
  Craig Tataryn wrote:
 
   How about this:
  
   !-- MyResources would be replaced with whatever class name
  you used in the
   application
   init-param you setup for the ActionServlet
   --
   jsp:useBean id="resouces" class="MyResources" /
  
   html:img src="someImage.png" alt='%=
  resources.getString("someImage.alt.text")
   %'/
  
   Craig T.
  
   Peter Alfors wrote:
  
scratch that.  You would need to have a bean that had
  access to the messages.
   
Peter Alfors wrote:
   
 I think that bean:define  does what you want.

 bean:define id="altTxt" property="someImage.alt.text"/
 html:img src="someImage.png" alt="%= altTxt %"/

 HTH,
 Pete

 




Re: Internationalised 'alt' text

2001-03-29 Thread Maya Muchnik


No exception. Here is a short cut from view source:
...
form name="logonForm" method="POST" action="/jndi2/logon.do;jsessionid=...">

table...>
tbody>
tr>td>Username:/td>
 td>input ...>/td>
/tr>
tr>td>Password:/td>
 td>input ...>/td>
/tr>
tr>td>input type="image" name=""
src="/jndi2/images/button_enter.gif;jsessionid=..." border="0">
/td>/tr>
/tbody>
/table>
...
/form>
script language=... >
...
/script>
...
As you can see name is empty.
Maya
Howard Moore wrote:
It's possible I suppose. I've tried it with Tomcat
3.2 using pageKey rather
than src and it works ok (using Struts 1.0b1). What happens when you
try to
use the tag, e.g. what html is produced or what exception is thrown?
> -Original Message-
> From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 14:01
> To: [EMAIL PROTECTED]
> Subject: Re: Internationalised 'alt' text
>
>
> Thank you, Howard. And if this does not work for me, is that
> meant, because I
> am using Tomcat 3.1? In your example below I am using pageKey
> instead of src.
>
>
>
> Howard Moore wrote:
>
> > The html:img tag now contains an altKey attribute that does
> what you want.
> >
> > e.g.
> >
> > html:img src="someImage.png" altKey="someImage.alt.text"/>
> >
> > > -Original Message-
> > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> > > Sent: 28 March 2001 21:54
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Internationalised 'alt' text
> > >
> > >
> > > Hi, this is an old email, but not resolved, at least for me.
> > > Maybe somebody can give
> > > me a hunt.
> > > I have tried both suggestions. Both are not working. Maybe I
> > > am doing something
> > > wrong.
> > > Thanks in advance.
> > > Maya
> > >
> > > Craig Tataryn wrote:
> > >
> > > > How about this:
> > > >
> > > > 
-- MyResources would be replaced with whatever class name
> > > you used in the
> > > > application
> > > > init-param
you setup for the ActionServlet
> > > > -->
> > > > jsp:useBean id="resouces" class="MyResources" />
> > > >
> > > > html:img src="someImage.png" alt='%=
> > > resources.getString("someImage.alt.text")
> > > > %>'/>
> > > >
> > > > Craig T.
> > > >
> > > > Peter Alfors wrote:
> > > >
> > > > > scratch that. You would need to have a bean that had
> > > access to the messages.
> > > > >
> > > > > Peter Alfors wrote:
> > > > >
> > > > > > I think that bean:define> does what you want.
> > > > > >
> > > > > > bean:define id="altTxt" property="someImage.alt.text"/>
> > > > > > html:img src="someImage.png" alt="%= altTxt %>"/>
> > > > > >
> > > > > > HTH,
> > > > > > Pete
> > > > > >
> > >
>




Re: need some explaination with logon.do

2001-03-29 Thread Maya Muchnik

Here is a good explanation how this application works and other stuff.
http://www.husted.com/about/struts/example-tour.html
http://www.husted.com/about/struts/
Maya

"Charlemagne L. Rey" wrote:

 Hello everybody,

 I think I still don't understand how did the struts-example flows.
 Could anybody please give me an explaination of what is happening
 to have the virtual page logon.do? Who created this page? How this
 page come-up?  It is here where I am stocked up with my learning
 of the Jakarta Struts.
 Any help will be greatly appreciated.

 Thank you.
 Charlemagne Rey




Re: form bean question

2001-03-29 Thread Maya Muchnik

Eugene,

If I have understood your question, the 1st place is jsp file, where the form
is directly used. The 2nd place (config file) where you set mapping up. For
example you tell that logonForm (the first letter is lower case) is coming from
the class LogonForm, and jsp file logon.jsp will be called if the server needs
to access the form logonForm.

Maya

Jacob Thomas wrote:

 The html:form tag will either lookup or instantiate the ActionForm so that
 the form parameters can be set to meaningful values on the page. Then, when
 the user makes changes and submits the form, the ActionServlet will populate
 the same ActionForm instance (if it is given 'session' scope) with the
 user's values and pass the form bean to the Action controller.
 --
 Jacob

 -Original Message-
 From: Eugene Krivopaltsev [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 10:52 AM
 To: [EMAIL PROTECTED]
 Subject: form bean question

 Hello everyone,

 I am learning struts and have following question:

   Why form should be described in two places:

   1. in jsp page (I am looking at logon example):

   html:form name="LogonForm" type="fully qualif. name" ...


   2. struts-config.xml

   form bean name=name="LogonForm"
 type = "   as in 1 "
 .

  Thanks,
 --
 Eugene Krivopaltsev Sun Microsystems, Inc.
 [EMAIL PROTECTED] 901 San Antonio Road
 Voice: 650.786.6260 (x86260)Palo Alto, CA. 94303
 Fax:   650.786.7816 www.sun.com




Re: .properties file

2001-03-29 Thread Maya Muchnik

Yes, you can put anything into your application file (jsp file name, image
file name, and text file name). The problem is who will read it? You need to
have some Action that for a particular request will open this file (name you
can get though MessagesResources) and read it.
Maya

Yuriy Zubarev wrote:

 Hello friends,

 I was wondering if there is a way to store a relatively big amount of text
 (which can't be fitted in one single line) assigned to some variable in
 the ApplicationResources.properties file. This text eventually will be
 local-sensitive that's why I want to put it into the .properties file.

 Thank you for your time.

 Best of luck,
 Yuriy Zubarev

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




Re: how do i unsubscribe from this list?

2001-03-29 Thread Maya Muchnik

To stop subscription for this address, mail:
[EMAIL PROTECTED]
where john = your username, host.domain = your domain name.

"Perez, Bill" wrote:

 how do i unsubscribe from this list?




Re: just want to know...

2001-03-29 Thread Maya Muchnik

Different sizes - I can understand, because the different compilers and
/ or different build environment. Why does not work - no clue? I am
using prebuild (night build) version.

"Charlemagne L. Rey" wrote:

 Hello everybody,

 I currently have the 1.0 version of struts. I tried to look at
 the examples and studied it. When I recompiled the sources from
 the examples/src directory, I noticed that the byte size are not
 equal. And when I replaced the classes, it produces a different
 output.  It is very obvious that the version that I recompiled
 is different and also not working. Why?

 Thank you.
 Charlemagne Rey




Re: Template -struts-template and generated HTML / templating using PUSH model

2001-03-28 Thread Maya Muchnik

Hi, Christophe,

I understand that you prefer to talk in French. But we cannot read your email. If you
would like to talk only with Cedric, you can send email only to him, not all struts
users.

Thanks and sorry for any interruption.

Maya

Christophe Vigny wrote:

 J'espere, que cela prendra en compte l'internationnalisation. Les fichiers de
 resources, ne permettent pas de gerer des pages stylises.

 Ce qui m'interesserait, dans un systeme de templates, ce sont des feuilles de style
 (pas xsl) qui s'appliqueraient sur des beans, et qui permettrait au graphiste de
 dfinir globalement comment s'affiche l'objet, puis de l'utiliser via des tags.

 a+

 Cedric Dumoulin a crit :

Hi Vincent,
 
Have a look to Components proposal. Components proposal can be seen as
  "extended templates". With Components you can define your template's
  contents/attributes in a separate file, and insert content by using its name. A
  content, named a component, can also inherit from other definitions. Components
  proposal also contains other features.
See (main site) http://www.lifl.fr/~dumoulin/components
   (mirror) http://www.geocities.com/cedricdumoulin/components/
 
I am currently working on the possibility to define or modify the
  template/component inside the action or inside the jsp. This will be available
  soon (see a previous mail 'Re: PROPOSAL: Template Screens').
Furthermore, useful Components features will be progressively introduce in
  Struts version 1.1
 
For your first question, see intermixed.
 
Cedric
 
  Vincent Harcq wrote:
 
   Hi,
  
   1. I am beginning to look at Templating mechanism and so use the example
   struts-template using version pre-beta-2 (23/03/01).
   The result is a strange for me.  Can somebody explain me this.
   On the first page, when I look at the generated code (look at the end of
   message), I got something where the side-bar.jsp and header.jsp is included
   BEFORE the html tag; while from what I see in chapterTemplate.jsp, the
   html should appear first.
   Is there a problem somewhere ?  Does somebody is aware of that ?  Is it my
   browser ?
  
 
What jsp server do you use ? This happens because your server doesn't flush
  included page.
You can try to use the components library instead of template one, it is fully
  compatible.
 
  
   2. I was also thinking about another mean of doing templating.  The fact
   that I have two create each 2 files (introduction.jsp and introduction.html)
   is not really needed if you consider you have a little number of different
   templates to work with.
   Say you have only two templates (side-bar header content footer) (left-bar
   header content right-bar footer), it is too much for me to create each time
   the page that will use template:put.
   I have done that before I used Struts in a "request processor" by setting
   the value of a "content" field, forwarding to one of two pages template1.jsp
   and template2.jsp that uses jsp include tags.
   My plan was to do that in the findForward() method of ActionForwards and
   forward all the time to one of the 2 template pages that I have and setting
   the "content" value before.
   To speak "philosophically", but wishing to not re-open this debate, the PUSH
   method is for me more convenient that the "PULL" one for Page Templating
   Mechanism.  But I do not want to "mix" Velocity and Struts only""" to
   solve this templating problem.
  
 
  
   Any ideas ?
  
   HTML generated:
   ---
  
   font size='5'a name="top"Topics/a/fontp
 table width='145'
   trtda href='introduction.jsp'
   Introduction /a/td/tr
  
   trtda href='using.jsp'
   Using Templates /a/td/tr
  
   trtda href='optional.jsp'
   Optional Content /a/td/tr
   trtda href='more.jsp'
   ... and more .../a/td/tr
 /table/p
  
   table
  tr
 tdimg src='graphics/java.gif'//td
 tdimg src='graphics/templates.gif'//td
  /tr
   /tablehr
   html
. . .
  
   _
   Do You Yahoo!?
   Get your free @yahoo.com address at http://mail.yahoo.com




REPOSTED: html:image tag altKey - work or not?

2001-03-28 Thread Maya Muchnik

Hi,

I have a problem with this attribute - no visible value at the browser. Is
this a bug or I am missing something?

Thanks in advance.

Maya




Re: Internationalised 'alt' text

2001-03-28 Thread Maya Muchnik

Hi, this is an old email, but not resolved, at least for me. Maybe somebody can give
me a hunt.
I have tried both suggestions. Both are not working. Maybe I am doing something
wrong.
Thanks in advance.
Maya

Craig Tataryn wrote:

 How about this:

 !-- MyResources would be replaced with whatever class name you used in the
 application
 init-param you setup for the ActionServlet
 --
 jsp:useBean id="resouces" class="MyResources" /

 html:img src="someImage.png" alt='%= resources.getString("someImage.alt.text")
 %'/

 Craig T.

 Peter Alfors wrote:

  scratch that.  You would need to have a bean that had access to the messages.
 
  Peter Alfors wrote:
 
   I think that bean:define  does what you want.
  
   bean:define id="altTxt" property="someImage.alt.text"/
   html:img src="someImage.png" alt="%= altTxt %"/
  
   HTH,
   Pete
  




Re: security and SSL

2001-03-27 Thread Maya Muchnik

I think, SSL is supported or not supported by a servlet container which you are
using. If it supports SSL you can find some instructions to set up / configure.

Marcin Baj wrote:

 Hello

 what is support for secure authorization in Struts? Is SSL included? Can you
 direct me to some example?

 thanks in advance,
 Bajo




Re: Estimating Projects with Struts

2001-03-27 Thread Maya Muchnik

It is depending on how much your team are familiar with Struts. If you
can explain or draw a good picture for page developers how to use the
Struts tags, then to develop small screen - 1/2 day (from a scratch),
big one - 1 week. Then your java developers need to make the Action and
Form classes for each form (until we do not have a general purpose
Action and Form). It can take 2 months, depending how big is your team.
Also, installation, bugs fixes, testing on Tomcat-Apache can take 1
month. It is minimum from my point of view.

By the way, what is Kawa - IDE? Can you email its link?

Maya

Kyle Robinson wrote:

 We are using:

 JDK 1.3
 Struts 1.0b1
 Tomcat 3.2.1
 Apache 1.3.19
 Kawa 5.0 (Pro Edition)
 Win2000
 Oracle 8.1.6 (Stored Procedure calls from JDBC)

 -Original Message-
 From: malcolm davis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 26, 2001 22:39
 To: [EMAIL PROTECTED]
 Subject: RE: Estimating Projects with Struts

 Hello Kyle,

 What kind of development envior. are you using?

-Original Message-
From: Kyle Robinson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 26, 2001 5:09 PM
To: Struts (E-mail)
Subject: Estimating Projects with Struts
   
   
We have a number of projects, big and small starting up that
will be using
Struts as a framework.  Our main concern with this is how to
best estimate
with it.  Does anyone have any experience with estimating with
Struts?  For
example, how long it takes to do the following:
   
1. A basic screen (editing, saving to a db, etc.)
2. A medium screen (same as above but maybe with a parent, child
relationship)
3. A complex screen (same as above but maybe some special
naivgation, extra
controls)
   
This may sound broad but any help would be appreciated...
   
Thanks.
   
Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111
   




Re: Oracle iAS 9i/Struts/BC4J

2001-03-27 Thread Maya Muchnik

Hi,

Could you please give me a link to BC4J. I think all database companies
application servers are very good from database point of view. They are
good to get / put info to the database. I am not sure, that other
interfaces are so good too.

Maya

Darcy Schultz wrote:

 We are starting to look at the possibility of
 combining these technologies and I would like to know
 if anyone has done this.  It seems most are using
 Tomcat and Struts and I'm a little worried about using
 Struts with Oracle's Servlets and JSP implementation
 (which I believe is based on JServ).

 OffTopic
 If someone is currently using BC4J, could you please
 let me know if it's a real OO-Relational Mapping tool.
  Everything I read, uses a rowset concept instead of
 object collections.  Is that the way this thing works?
 /OffTopic

 thanks,
 Darcy Schultz.

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




no struts.tld - how does it work?

2001-03-27 Thread Maya Muchnik

Hi,

struts-example (maybe other examples) does not have struts.tld file as a
tag descriptor in web.xml. How does it work? Find all tags because this
file is under WEB-INF?

Thanks in advance.

Maya




Re: Can I nest struts:message tag in struts:link tag?

2001-03-27 Thread Maya Muchnik

I have got the answer before, that you cannot nest tags.

JeanX wrote:

 Hi struts-user,

 Can I nest struts:message tag in struts:link tag ?
 Because I want to setup some query parameter in resources.
 Thx

 :=)
 Best regards,
 JeanX
 pacificnet.com(GZ)




Re: no struts.tld - how does it work?

2001-03-27 Thread Maya Muchnik

I have found the answer - struts.tld is for 0.5 version.

Maya Muchnik wrote:

 Hi,

 struts-example (maybe other examples) does not have struts.tld file as a
 tag descriptor in web.xml. How does it work? Find all tags because this
 file is under WEB-INF?

 Thanks in advance.

 Maya




Re: Locales and images

2001-03-26 Thread Maya Muchnik

Craig and others,

I am sorry to "touch" the old question. I have a problem with this tag to display
altKey (not displayed at all).

Here is an extract from my resourse file:
image.btnEnter=/images/button_enter.gif
altkey.btnEnter=btnEnter

And this is a call from jsp:
html:image pageKey="image.btnEnter" altKey="altkey.btnEnter" alt="enter" border="0"/

I have tried with and without "alt".

Thanks in advance for your help or suggestions.

Maya

"Craig R. McClanahan" wrote:


 Now, in my application resources for English, I might have:

 image.a=/images/a_en.gif
 image.b=/images/b.gif

 Now, I can create a
 single JSP page that grabs the correct version of each image:

 html:image pageKey="image.a"/
 html:image pageKey="image.b"/

 (When you use the "pageKey" attribute, your paths have to be context
 relative and start with a slash, just like all the paths in
 struts-config.xml.)

 Craig





Re: ServletException: org/apache/struts/action/ActionForm

2001-03-22 Thread Maya Muchnik



Of course, you have reference to this class if you have compiled your LogonForm
class with struts.jar. But one thing is to compile, other thing it is to
run. When you run your application Tomcat must to find struts.jar under
your_app/WEB-INF/lib. ApplicationMapping class is in your application too,
if you are using struts-example as the base. Check it's source code to
understand from what mapping is coming.
Maya
Manuel Alzola wrote:
Hello.No
reference to ActionForm in all the project. There is one thing that I dont
understand in the struts example that may have relation since my project
is based on that. I see no place where ApplicationMapping is configured
as the ActionMapping for the aplication.

- Original Message -

From:
Maya
Muchnik

To: [EMAIL PROTECTED]

Sent: Wednesday, March 21, 2001 10:18
PM

Subject: Re: ServletException: org/apache/struts/action/ActionForm
For some reason login.jsp is looking for org/apache/struts/action/ActionForm
class and this class not found.
The error is:
NoClassDefFoundError: org/apache/struts/action/ActionForm
Try to find a reference to this class (web.xml, struts-config.xml).
Maya
Manuel Alzola wrote:


Hello. Im having a problem with a project I started modifying struts-example
from beta 1.0I renamed the webapp and changed the LogonAction and LogonForm
to a different package. This classes are available under the directory
/WEB-INF/classess. I also changed the package and class names in the config-xml.
The problem is Im no longer able to access /logon.jsp. I keep getting
the following error. Localizacion:
/puro-feeling/logon.jspError interno del servlet:javax.servlet.ServletException:
org/apache/struts/action/ActionForm
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
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)
Causa Raiz: java.lang.NoClassDefFoundError:
org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native
Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native
Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:446)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native
Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:524)
at _0002flogon_0002ejsplogon_jsp_4._jspService(_0002flogon_0002ejsplogon_jsp_4.java:162)
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)
Thanks in advanceManuel Alzola







Re: getter methods ...

2001-03-21 Thread Maya Muchnik


Hi,
I think you need to change or property name to view or change getter/setter
and other stuff. See below in red.
Maya
"G.L. Grobe" wrote:
I'm new to struts and trying to get my index.jsp
to show up, but instead I
get the following error:
500 Internal Server Error
javax.servlet.jsp.JspException: No getter method available for property
View
for bean under name org.apache.struts.taglib.html.BEAN at
org.apache.struts.taglib.html.RadioTag.doStartTag(RadioTag.java, Compiled
Code) at /index.jsp._jspService(/index.jsp.java, Compiled Code) at
com.orionserver.http.OrionHttpJspPage.service(JAX, Compiled Code) at
com.evermind.server.http.HttpApplication.xj(JAX, Compiled Code) at
com.evermind.server.http.JSPServlet.service(JAX, Compiled Code) at
com.evermind.server.http.d3.sw(JAX, Compiled Code) at
com.evermind.server.http.d3.su(JAX, Compiled Code) at
com.evermind.server.http.ef.s1(JAX, Compiled Code) at
com.evermind.server.http.ef.do(JAX, Compiled Code) at
com.evermind.util.f.run(JAX, Compiled Code)
Somehow I think the ViewForm bean is not being found as I've got the
properties included, but it seems to be defaulting to another bean.
I don't
think I've got to map the properties to the bean, as they map automatically
to the bean in the action form, right?
I've included all my files trying to get a simple example going.
Any help much appreciated.
- ViewForm.java -
package com.neuroquest.cais.actions;
import org.apache.struts.action.ActionForm;
public class ViewForm extends ActionForm
{
 protected String viewName;
 public String getViewName()
{
 return viewName;
 }
 public void setViewName(String
view) {
 this.viewName = view;
 }
}
- ViewAction.java -
package com.neuroquest.cais.actions;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public class ViewAction extends Action
{
 public ActionForward perform(ActionMapping mapping, ActionForm
form,
 HttpServletRequest
request, HttpServletResponse response) {
 // turn form instance into custom form
bean.
 ViewForm viewForm = (ViewForm) form;
 String viewName = viewForm.getView();
 if (viewName.equals("Master View")) {
 return mapping.findForward("master");
 }
 else if (viewName.equals("Details View"))
{
 return mapping.findForward("details");
 }
 return mapping.findForward("error");
 }
}
- inside my web.xml -
 servlet>
 servlet-name>action/servlet-name>
 servlet-class>org.apache.struts.action.ActionServlet/servlet-class>
 init-param>
 param-name>application/param-name>
 param-value>com.neuroquest.cais.resources.cais/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>validate/param-name>
 param-value>true/param-value>
 /init-param>
 !--init-param>
 param-name>mapping/param-name>
param-value>com.neuroquest.cais.actions.CustomMapping/param-value>
 /init-param-->
 load-on-startup>1/load-on-startup>
 /servlet>
 servlet-mapping>
 servlet-name>action/servlet-name>
 url-pattern>*.do/url-pattern>
 /servlet-mapping>
- struts-config.xml -
?xml version="1.0" encoding="ISO-8859-1" ?>
!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts
Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
!-- defines action mappings -->
struts-config>
 form-beans>
 form-bean name="viewForm"
 type="com.neuroquest.cais.actions.ViewForm"
/>
 /form-beans>
 !--global-forwards type="org.apache.struts.action.ActionForward"
>
 forward name="logon" path="/logon.jsp"
/>
 forward name="success" path="/index.jsp"
/>
 /global-forwards-->
 action-mappings>
 action path="/view" type="com.neuroquest.cais.actions.ViewAction"
 name="viewForm">
 forward name="master"
path="web/master.jsp" />
 forward name="details"
path="web/details.jsp" />
 forward name="error"
path="web/error.jsp" />
 /action>
 /action-mappings>
/struts-config>
 inside my index.jsp 
html:form action="view.do">
center>
table border="0" cellspacing="2" cellpadding="0" align="left">
 tr>
 td>
 html:radio property="View"
value="Master View">
 a href="#">bean:message
key="main.master" />/a>nbsp;
 /html:radio>
 /td>
 td>
 html:radio property="View"
value="Details View">
 a href="#">bean:message
key="main.detail" />/a>
 /html:radio>
 /td>
 /tr>
 tr>
 td>
 center>
 html:submit value="View"/>
 /center>
 /td>
 /tr>
/table>
/center>
/html:form>



Re: Struts, Trubine, Velocity, Expresso

2001-03-21 Thread Maya Muchnik

You can find some analysis and comparison by searching, for example,
"Velocity" or "Trubine" in our archieve emails.

Muhammad Aamir wrote:

  Hi,

  I recently explored the Struts Application framework features and
  developed an small application using Struts.

  Recently I heard about other frameworks like Trubine, Velocity and
  Expresso. I am really confused about what to choose and what is the
  difference between these frameworks.

  Can anybody explain these frameworks and their differences ?



  Thanks in advance
  Muhammed Aamir




Re: Locales and images

2001-03-21 Thread Maya Muchnik

I am trying to use this for different "look". But my principle is simple. In one
application a.gif - is a blank,
in other - it is some picture. And so on... Change your property file to point to a
different directory for different "look". But in this approach you have one match
between application and the property file. If you want to change a "look" on-fly,
you need to have different images, for example, a_look1.gif, a_look2.gif and make a
different link depending on a "look" parameter.

Maya

Nick Afshartous wrote:

   On Tue, 20 Mar 2001, Maya Muchnik wrote:
   
Can I put a.gif into the property file too, and have the second statement as
this:
html:image src="a.image"/
Or I can have
html:image srcKey="a.image.dir"/
   

 Craig R. McClanahan writes:
   The assumption behind this new facility is that you need to
   internationalize your images as well as your messages.  Perhaps, for
   example, you've created image buttons and the text of those buttons needs
   to be different depending on the user's locale.

 Could this new facility be based not
 only on locales ?  For example, in my company we're discussing
 how to manage different "looks" of our application by having
 different sets of images for each "look".  A facility like the
 one being dicussed could make it easy to manage this.
 --

 Nick




Re: Locales and images

2001-03-21 Thread Maya Muchnik

1/
How about several files under A directory:
B.properties
B_en.properties
B_de.properties
B_fr.properties

and so on...

Can you see it, that you have a problem.
2/
How about a file name as extra init parameter  that has names of all properties
files that you want to "combine". But this becomes a little complicated when you
think about different languages.

Maya

Ken Beyer wrote:

 Ken Beyer wrote:

   Anyone have a snippet of a build.xml that's does this "combining" of
   the properties files?
 

 I appologize for beating this thread to death, but I want to mention 2
 more things.

 1) I think I found another way to merge multiple
 properties files (if anyone cares :-). I could write my own
 MessageResourcesFactory class and pass that in via the "factory"
 init-param of my web.xml file.   My home-grown class could do something
 like merge all properties files found under a directory, and either throw
 an exception on duplicates, or simply ignore repeats.

 2) Is it possible to change "application" (init-param) to somehow
 suck in a HashMap of MessageResources?   Maybe through
 multiple init-params or a properties file containing pointers to other
 properties files.  Then I'd call something like getMessage("imagebundle",
 "go.away.button", arg1), or perhaps use a static
 getMessageResourcesByMap("imagebundle").  Also when using struts
 taglibs, when I send - bundle="imagebundle", it would use it as
 a key into the HashMap of MessageResources.  Does this sound feasable
 or even needed?

 Looking at the Struts code, it looks like it might be too much to introduce, but
 just thought I'd mention it.

 Ken




Re: reloading issue

2001-03-20 Thread Maya Muchnik

Additional info: if you recompile FormBean, Action, then copy a new *class file under
appropriate tomcat directory. It will be reloaded automatically (if you do not change 
Tomcat
configuration). The same is true for JSP files.

Jean-Noel Ribette wrote:

 It is possible to reload the struts-config file: 
http://localhost:8080/myApp/admin/reload.do

 (to be able to do that the reload action must be declared in struts-config)

 Jean-Noel

 - Original Message -
 From: Ali Ozoren [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, March 20, 2001 10:14 AM
 Subject: reloading issue

  Hi all, I'm new in this list so please be patient. I looked into docs and
  mail archives, and deja but couldn't find a solution to the problem. Every
  time I make a chance in the formbean, action, jsp, or the strut-config.xml
  file, I have to stop and restart Tomcat. Is this necessary (if yes, dang!),
  if not how can I correct this (making every change not requiring restarting
  Tomcat)?
  Thanks
  --a
 




Re: Locales and images

2001-03-20 Thread Maya Muchnik

Craig,

Can I ask you on an example to be sure, that it is correct.
My images are under images directory from root application dir. So, I can put the
following statements:
(in a property file :
message.key=images
a.image=a.gif
a.image.dir=images/a.gif
)

html:image pageKey="message.key"/
...
html:image src="a.gif"/
...

Can I put a.gif into the property file too, and have the second statement as
this:
html:image src="a.image"/
Or I can have
html:image srcKey="a.image.dir"/

Thanks,

Maya

"Craig R. McClanahan" wrote:

 There was a recent addition to the html:image and html:img tags to
 support internationalized images elegantly.

 Previously, you had to use the "src" attribute to specify the URI of your
 image.  If you needed different images for each language, you had to use a
 scriptlet expression of some sort to calculate them.

 Now, you can specify a message key (to be looked up in your application
 resources) instead:

 html:image srcKey="message.key"/

 where "message.key" identifies the path to this image from your
 application resources.

 If you want to use context-relative paths everywhere, use:

 html:image pageKey="message.key"/

 instead.



 Craig




Re: Any good example?

2001-03-20 Thread Maya Muchnik


struts-example is the best known open example how to use struts. If you
know it with all details - you are in good "shape". Any form extends ActionForm.
When you will design your application you will start with forms design,
beans corresponding to them and so on...

See Yam Lim wrote:

Hey guys,
 i
am new to Struts. i try to speed up my learning here. could anybody show
me a good example? i already got the examples that come with Struts. Can
anyone also tell me what role ActionForm plays in Struts?
Thanks.
See-Yam Lim




Re: Locales and images

2001-03-20 Thread Maya Muchnik

To have a separate property file for each JSP - it is too much. All the rest - a good
idea.
I am creating my servlet that extends ActionServlet and does two things: expending
destroy and init functions. The reason - I have to initialize some paramaters that I
will use in xxxAction through application attributes.

Other thing you need to remember that all xxx_xx.properties files do not need to have
all messages that in the xxx.properties file. Only what is different.

Maya


Ken Beyer wrote:

 I'm struggling with something very similar and could really
 use a recommendation.

 In the Building View Components documentation about i18n,
 (http://jakarta.apache.org/struts/userGuide/building_view.html),
 it describes using a MyResources.properties (default) and
 other MyResources_XX.properties for other languages.
 This uses the "application" init-param of the ActionServlet in web.xml.
 That's fine and dandy for a small application, but

 for a large JSP application, I don't think I want to maintain *all* my
 i18n text (including images!) in a single file per language.
 I'm thinking the best way to break this up is to put some "common"
 text in a file like CommonResources.properties.  Put my images in
 a file like ImageResources.properties.  And finally put text that
 is unique to each JSP file in their own properties files (for example
 Foo.jsp - FooResources.properties, Bar.jsp - BarResources.properties,
 etc.) - and I realize that for each language, I'd need a
 BarResources_DE.properties for example, but that's okay.
 I think that each of these ResourceBundle's needs to be put under their
 own application scoped bean/key, i.e. imageresource -
 com.mycompany.mypackage.ImageResources.

 Question is, is this the right approach?  If so, how do I do this?
 I think I use ... bundle="fooresource" via each struts tag, (i.e.
 html:img pageKey="welcome.gif" bundle="imageresource" border="0"/)
 And I'd have to load that  in advance via each controller servlet (or should
 I extend org.apache.struts.action.ActionServlet and load them all there).
 Is this all correct?   A pointer to an example would help me greatly.

 Thanks,
 Ken

 Maya Muchnik wrote:

  Craig,
 
  Can I ask you on an example to be sure, that it is correct.
  My images are under images directory from root application dir. So, I can put the
  following statements:
  (in a property file :
  message.key=images
  a.image=a.gif
  a.image.dir=images/a.gif
  )
 
  html:image pageKey="message.key"/
  ...
  html:image src="a.gif"/
  ...
 
  Can I put a.gif into the property file too, and have the second statement as
  this:
  html:image src="a.image"/
  Or I can have
  html:image srcKey="a.image.dir"/
 
  Thanks,
 
  Maya
 
  "Craig R. McClanahan" wrote:
 
   There was a recent addition to the html:image and html:img tags to
   support internationalized images elegantly.
  
   Previously, you had to use the "src" attribute to specify the URI of your
   image.  If you needed different images for each language, you had to use a
   scriptlet expression of some sort to calculate them.
  
   Now, you can specify a message key (to be looked up in your application
   resources) instead:
  
   html:image srcKey="message.key"/
  
   where "message.key" identifies the path to this image from your
   application resources.
  
   If you want to use context-relative paths everywhere, use:
  
   html:image pageKey="message.key"/
  
   instead.
  
  
  
   Craig

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




Re: Locales and images

2001-03-20 Thread Maya Muchnik

Craig,

If  b.gif is a shared resource for two resource files, is it true, that only a default
resource file (without language extension) needs to have it?

Maya

"Craig R. McClanahan" wrote:

 On Tue, 20 Mar 2001, Maya Muchnik wrote:

  Craig,
 
  Can I ask you on an example to be sure, that it is correct.
  My images are under images directory from root application dir. So, I can put the
  following statements:
  (in a property file :
  message.key=images
  a.image=a.gif
  a.image.dir=images/a.gif
  )
 
  html:image pageKey="message.key"/
  ...
  html:image src="a.gif"/
  ...
 
  Can I put a.gif into the property file too, and have the second statement as
  this:
  html:image src="a.image"/
  Or I can have
  html:image srcKey="a.image.dir"/
 

 The assumption behind this new facility is that you need to
 internationalize your images as well as your messages.  Perhaps, for
 example, you've created image buttons and the text of those buttons needs
 to be different depending on the user's locale.

 Now, let's take Maya's example, and say that our images are stored in an
 "images" directory (relative to the context path of this
 application).  Now, in my application resources for English, I might have:

 image.a=/images/a_en.gif
 image.b=/images/b.gif

 while in my application resources for French, I might have:

 image.a=/images.a_fr.gif
 image.b=/images.b.gif

 Note that -- with these settings -- I'm using a different GIF file for the
 "a" image, but (currently) sharing the "b" image.  Now, I can create a
 single JSP page that grabs the correct version of each image:

 html:image pageKey="image.a"/
 html:image pageKey="image.b"/

 (When you use the "pageKey" attribute, your paths have to be context
 relative and start with a slash, just like all the paths in
 struts-config.xml.)

 Note one added advantage of this approach.  Currently, we're sharing the
 "b" image because it didn't need to be internationalized.  Now, you decide
 that you really do want to make it different.  All you have to do is:
 * Create the new "/images/b_en.gif" and "/images/b_fr.gif" image files
 * Change the two lines in your application resources
 * Restart your app, with no change to any JSP page that uses
   those images.

 Pretty slick, huh?  :-)

  Thanks,
 
  Maya
 

 Craig

  "Craig R. McClanahan" wrote:
 
   There was a recent addition to the html:image and html:img tags to
   support internationalized images elegantly.
  
   Previously, you had to use the "src" attribute to specify the URI of your
   image.  If you needed different images for each language, you had to use a
   scriptlet expression of some sort to calculate them.
  
   Now, you can specify a message key (to be looked up in your application
   resources) instead:
  
   html:image srcKey="message.key"/
  
   where "message.key" identifies the path to this image from your
   application resources.
  
   If you want to use context-relative paths everywhere, use:
  
   html:image pageKey="message.key"/
  
   instead.
  
  
  
   Craig
 
 




Re: Locales and images

2001-03-20 Thread Maya Muchnik

Craig,
As I understand Ken, he wants to have several files and not combine them in a
application level. He wants to add one attribute for each tag, where the file
name is pointed out. Right Ken? Is it possible? From your response, it is not.
Maya

"Craig R. McClanahan" wrote:

 On Tue, 20 Mar 2001, Ken Beyer wrote:

 
  I'm struggling with something very similar and could really
  use a recommendation.
 
  In the Building View Components documentation about i18n,
  (http://jakarta.apache.org/struts/userGuide/building_view.html),
  it describes using a MyResources.properties (default) and
  other MyResources_XX.properties for other languages.
  This uses the "application" init-param of the ActionServlet in web.xml.
  That's fine and dandy for a small application, but
 
  for a large JSP application, I don't think I want to maintain *all* my
  i18n text (including images!) in a single file per language.
  I'm thinking the best way to break this up is to put some "common"
  text in a file like CommonResources.properties.  Put my images in
  a file like ImageResources.properties.  And finally put text that
  is unique to each JSP file in their own properties files (for example
  Foo.jsp - FooResources.properties, Bar.jsp - BarResources.properties,
  etc.) - and I realize that for each language, I'd need a
  BarResources_DE.properties for example, but that's okay.
  I think that each of these ResourceBundle's needs to be put under their
  own application scoped bean/key, i.e. imageresource -
  com.mycompany.mypackage.ImageResources.
 
  Question is, is this the right approach?  If so, how do I do this?
  I think I use ... bundle="fooresource" via each struts tag, (i.e.
  html:img pageKey="welcome.gif" bundle="imageresource" border="0"/)
  And I'd have to load that  in advance via each controller servlet (or should
  I extend org.apache.struts.action.ActionServlet and load them all there).
  Is this all correct?   A pointer to an example would help me greatly.
 

 You are correct about the implications of using multiple application
 resource bundles -- it's a lot of work, but definitely feasible.

 One alternative strategy to consider is to keep the application resource
 bundles separate in your *source* code, but combine them together when you
 deploy the application (for example, you can use the unix "cat" command or
 the DOS "copy" command to combine text files).  As long as the message
 keys are all unique (which you should manage by requiring specific
 prefixes for different portions of the app), this will still work fine.

 The same basic strategy can be used to allow different developers to work
 on their own portions of the "struts-config.xml" file in the source code,
 but combine them all together when you create the application itself.

  Thanks,
  Ken
 
 
 Craig




PropertyUtils.copyProperties ?

2001-03-20 Thread Maya Muchnik

Hi,

If I am using PropertyUtils.copyProperties(user, info) then original bean
info must to have all properties that user bean has? If info has only 3
properties, and user has 18, copy will not work? I need to use this way,
because, for example, logon form needs only 3 properties, but user form (full
user info) has 18 properties. And only user bean has a method (function) to
check if a user is legal.

Thanks in advance.

Maya




Re: bean: access to the session

2001-03-20 Thread Maya Muchnik

What date you have in your computer ? Fri, 04 Jan 1980 18:46:20 ?

hunkpapa wrote:

 Hi,
 I've a problem with beans.
 I can use a bean with the writeTag and this works out well.

 But how can this bean access the session ?
 I want to read values I placed in the session
 to use them in the getter methods of the bean.




Re: PropertyUtils.copyProperties ?

2001-03-20 Thread Maya Muchnik

Thank you, Craig. You were right. I had removed (and forgot) a hidden property,
because I cannot figure out how to replace "nested tags".

Can somebody help me to replace html:hidden property="B" value='bean:message key
="A"/'/
Do I need to use jsp:useBean ...jsp:getProperty... and bean class is
org.apache.struts.BEAN ...

Thanks,

Maya

"Craig R. McClanahan" wrote:

 On Tue, 20 Mar 2001, Maya Muchnik wrote:

  Hi,
 
  If I am using PropertyUtils.copyProperties(user, info) then original bean
  info must to have all properties that user bean has? If info has only 3
  properties, and user has 18, copy will not work? I need to use this way,
  because, for example, logon form needs only 3 properties, but user form (full
  user info) has 18 properties. And only user bean has a method (function) to
  check if a user is legal.
 

 The copyProperties() method will only copy when the property names
 match.  It will ignore any unmatching properties in the origin or
 destination beans.

  Thanks in advance.
 
  Maya
 
 

 Craig




Re: HELP - Illegal target of jump or branch

2001-03-20 Thread Maya Muchnik

Several guys suggested to replace a lot of tags in one JSP to several JSPs, and
make the first one with @ include file=.../

Marc Ellison wrote:

 Hi,

 I have been getting a very interesting error folks ;-)

 I have constructed a jsp file that uses ALOT of struts-defined tags, and
 which I have running with Tomcat.  Initially the page would not work so I
 commented out a lot of the code.  The page now works to an extent, but as
 soon as I try to uncomment any of the other struts tags it throws this error
 message.

 javax.servlet.ServletException: (class:
 _0002fdemographicDetails_0002ejspdemographicDetails_jsp_73, method:
 _jspService signature:
 (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletRespo
 nse;)V)

 I have looked in the mail archive and one guy suggested changing the values
 of the stack/memory allocation pools to a higher value as it couldn't cope
 with the number of tags.  However, I still get the same error. Has anybody
 encountered a similar problemif so please HELP!!
 Kind regards
 Marc




Re: Locales and images

2001-03-20 Thread Maya Muchnik

I am not sure about several resource files. I have try to create other servlet and 
"match" it to
other file, initialize this file. But then what? It will stay in the memory and do 
nothing? Then
how about reload function? You need rewrite it too (run super.reload(), destroy your 
local info,
init your local info). It is not difficult if one file. For second one and new 
servlet

Thanks,
Maya

Ken Beyer wrote:

 I'm also seeing that it's way too much now (a message resource per jsp).

 I found the following to be helpful...
 
http://jakarta.apache.org/struts/api/org/apache/struts/util/package-summary.html#doc.Messages

 I'm thinking of at least starting off with separating the images from text,
 and maybe breaking the text down into packages later on.  Is it correct that
 I should override ActionServlet, and pass in additional init-param's similar
 to the "application" one?, i.e.

 init-param
 param-nameimageresource/param-name
 param-valuecom.mycompany.mypkg.ImageResources/param-value
 /init-param

 and then make sure that I load it (by overriding init()) and calling a
 private void initImageResources() + super init(), and similarly for the destroy.

 Also, I need to set locale to true in the web.xml (Action servlet section), and
 make sure I use "getMessage(Locale, String, ...)" pretty faithfully, right?
 Otherwise I'd always get the application's default language.

 Thx-
 Ken

 Maya Muchnik wrote:

  To have a separate property file for each JSP - it is too much. All the rest - a 
good
  idea.
  I am creating my servlet that extends ActionServlet and does two things: expending
  destroy and init functions. The reason - I have to initialize some paramaters that 
I
  will use in xxxAction through application attributes.
 
  Other thing you need to remember that all xxx_xx.properties files do not need to 
have
  all messages that in the xxx.properties file. Only what is different.
 
  Maya
 




nested tags again - Q

2001-03-19 Thread Maya Muchnik

Hi,

Maybe this question was posted already. I am sorry for the repetition.
Can somebody suggest what is the best case to resolve this expression
(maybe nested tags are not working):

html:hidden property="domainID" value='%= bean:message
key="admin.domaindn"/'/

value of domainID is still  %= bean:message key="admin.domaindn"/

Thank you all in advance.

Maya







display errors

2001-03-19 Thread Maya Muchnik

Hi,

Is it possible to display errors not from the first column (using html:errors/) ?

Thanks in advance

Maya




When and where ApacheCon?

2001-03-19 Thread Maya Muchnik

Craig, where and when is ApacheCon and O'Reily Java ... Con (if not too late) ?


"Craig R. McClanahan" wrote:


 It's short term.  I'm finishing up my last presentation for ApacheCon
 (I've got three of them), and then I get to go back to coding for a while.

 Craig





Re: display errors

2001-03-19 Thread Maya Muchnik

I found a OLD way (with table, tr, td, ...). But maybe for a next release ... Can
error tag to be improved ?
Maya
P.S. I know that we ask too much from several bright developers.

Maya Muchnik wrote:

 Hi,

 Is it possible to display errors not from the first column (using html:errors/) ?

 Thanks in advance

 Maya




Re: display errors

2001-03-19 Thread Maya Muchnik

I like when you are :-). I will try to be "active" helper, but later, when I will 
become
more familiar with struts, and other a lot of things!!!. Good luck to you in your
presentations in two conferences. I cannot go ( a project, and expenses). Can we get 
your
presentation on-line? (:-))

Maya

"Craig R. McClanahan" wrote:

 On Mon, 19 Mar 2001, Maya Muchnik wrote:

  I found a OLD way (with table, tr, td, ...). But maybe for a next release ... Can
  error tag to be improved ?

 Improvements are on the "nice to have this work better" list.

  Maya
  P.S. I know that we ask too much from several bright developers.
 

 Well, one way to fix that is to offer your own patches :-).  It is open
 source, after all.

 Craig

  Maya Muchnik wrote:
 
   Hi,
  
   Is it possible to display errors not from the first column (using 
html:errors/) ?
  
   Thanks in advance
  
   Maya
 
 




Re: display errors

2001-03-19 Thread Maya Muchnik

I think, you are correct to qualify this as a formatting. Take the
struts-example. The tag html:errors/ at the beginning of each file
will display error messages at top and left corner of a page.

David Winterfeldt wrote:

 What do you mean by "not from the first column".

 Are you talking about formatting?  What are you trying
 to do?

 David

 --- Maya Muchnik [EMAIL PROTECTED] wrote:
  I found a OLD way (with table, tr, td, ...). But
  maybe for a next release ... Can
  error tag to be improved ?
  Maya
  P.S. I know that we ask too much from several bright
  developers.
 
  Maya Muchnik wrote:
 
   Hi,
  
   Is it possible to display errors not from the
  first column (using html:errors/) ?
  
   Thanks in advance
  
   Maya
 

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




Re: Performance of struts

2001-03-19 Thread Maya Muchnik

I think, it will be slower because you have one central servlet DISPATCHER that
is sending a "job" to different Actions. When you have some JSP that are
sending "job" themselves to other JSP, it is faster. Is it convenient? I think
- no, because a creator JSP does not know java. And change flow, redesign
difficult.
Now, I have this "pie".

Maya

Keith wrote:

 Hi,
I am sorry if I offend anyone. I am evaluating struts and notice that the
 performance is much lower that if I use string jsp and servlets.
Has anyone have the same experience as I do? If so, is there any way to
 improve the performance?

 Thanks!
 keith




Re: How do I really bypass the deficient of a HTM editor?

2001-03-19 Thread Maya Muchnik

Hi, Keith,

I think, DreamWeaver has an implementation to display custom tags (UltraDev),
and now they are working to embed a support for the struts. Can you give
example you are talking about? Do you want, that tags will send additional
HTML code?

Maya

Keith wrote:

 Hi;
   I am new to struts, and thought I would be great if I can completely
 separate the HTML and web design from the java code. So, I tried out the
 first few pages of a project with struts implementation, only to realize
 that the web designer will not be able to see his design because all the
 custom tags cannot be displayed.
Consequently, I search in the mailing list archive, and notice that many
 people are having the same problem as I do. I came across a thread in which
 the author suggested embedding HTML code in the custom tags to enable the
 web designer to see the placement of the widgets. Everything seems to work
 except when I tried to use bean:message tag to display labels. Struts
 complains about not allowing content in this tag.
Has anyone have the same problem? How do you let the web designer does
 his design without having to guess the position of the labels and boxes?

 Thanks
 keith




Re: html:img tag cannot find image

2001-03-19 Thread Maya Muchnik

Can you try html:img src="/WEB-INF/images/orange-ball.gif"/
Maya

Tom Miller wrote:

 Hello all,

 It seems that the html:img tag is able to find images in the context
 root, but not in subdirectories.
 When I specify an image with the html:img tag like this:
 html:img src="green-ball.gif"/
 the images appear.

 But when I specify a subdirectory like this:
 html:img src="WEB-INF/images/orange-ball.gif"/
 the images are missing when the page renders, i.e. little red X symbol
 in the browser.

 Here is a pared down JSP that illustrates the problem. It gives the same
 results whether I include the html:base/ tag or not.

 I'm using Struts 1.0b1 and Tomcat 3.2.1.

 TIA for any help.

 Tom
 --

 %@ page language="java" %
 %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %

 html:html
html:base/
 head
 /head

 body
Dot Onehtml:img src="green-ball.gif"/   % /* image shows in
 browser */ %
p
Dot Twohtml:img src="WEB-INF/images/orange-ball.gif"/ % /* image
 missing in browser */ %

 /body
 /html:html
 --

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




Re: JDBC tag library released, source code ?

2001-03-19 Thread Maya Muchnik

Go to Taglib project of jakarta.apache.org

Joel Cordonnier wrote:

 Hi!

 I'm very interested to use this taglib. Is the source
 code also available ? where ? (the URL?)

 Thanks
 Joel

 --- Ted Husted [EMAIL PROTECTED] a crit :  Note:
 These tags are very easy to use with the
  Struts connection pool.
 
  Simply give your datasource a "key" property in your
  Struts-config file,
  and use the same key with the JDBC connection tag.
 
data-sources
data-source
  driverClass="org.gjt.mm.mysql.Driver"
 maxCount="4"
 minCount="2"
 password=""
  url="jdbc:mysql://localhost/test"
 user="test"
  key="DATASOURCE"
/
/data-sources
 
  and in your JSP
 
  sql:connection id="cn1"
  dataSource="DATASOURCE"/sql:connection
 
  Viola! That's it!
 
  (Or, if you're a purist, omit the key property and
  use:
 
  sql:connection id="cn1"
 
 dataSource="%=org.apache.struts.action.Action.DATA_SOURCE_KEY%"
  /sql:connection
 
  whew!)
 
   Original Message 
  From: Morgan Delagrange [EMAIL PROTECTED]
  Subject: [ANNOUNCE] JDBC tag library released
  To: taglibs-dev
  [EMAIL PROTECTED],taglibs-user
  [EMAIL PROTECTED]
 
  Taglibs is proud to announce the release of the JDBC
  tag library!  For full details, visit the site:
 
 
 
 http://jakarta.apache.org/taglibs/doc/jdbc-doc/intro.html
 
  The JDBC tag library is designed for reading from
  and
  writing to databases.  Features include:
 
- Seamless support for multiple databases
- Obtaining connections from Drivers,
  DataSources, and JNDI DataSources
- Support for Statements and PreparedStatements
- Automatic looping of ResultSets
- And so much more!
 
  Thanks to Rich Catlett, Glenn Nielsen, and most
  especially Marius Scurtescu for their invaluable
  contributions.
 
  - Morgan Delagrange
 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/

 ___
 Do You Yahoo!? -- Pour dialoguer en direct avec vos amis,
 Yahoo! Messenger : http://fr.messenger.yahoo.com




Re: struts - error message

2001-03-16 Thread Maya Muchnik


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

Dileep John wrote:




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








Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

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

"Anderson, Jessica" wrote:

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

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

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

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

 Any ideas?
 Thanks a lot,
 jessica

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

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

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

 thanks,
 jessica




Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

Here is a link to those emails:

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

"Anderson, Jessica" wrote:

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

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

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

 "Anderson, Jessica" wrote:

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




Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

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

"Anderson, Jessica" wrote:

 Thanks.

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

 Any comments regarding versions of Tomcat?

 Jessica

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

 Here is a link to those emails:

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

 "Anderson, Jessica" wrote:

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




Re: Missing Property

2001-03-16 Thread Maya Muchnik

Good eye!

Jean-Noel Ribette wrote:

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

 Jean-Nol




Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

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

"Anderson, Jessica" wrote:

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

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

 It seems that someone else must have experienced this.
 jessica

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

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

 "Anderson, Jessica" wrote:

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




Re: Unsafe path error

2001-03-16 Thread Maya Muchnik

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

"Anderson, Jessica" wrote:

 do you mean capitalize?

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

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

 "Anderson, Jessica" wrote:

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

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

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

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

 Any ideas?
 Thanks a lot,
 jessica

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

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

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

 thanks,
 jessica




Re: can other servlet have reload function

2001-03-15 Thread Maya Muchnik

I think what I need to do. Do not bother.

Maya Muchnik wrote:

 Hi,

 I would like to have a business servlet (similar as database servlet in
 struts-example) to reload its configuration files. Is it possible? What
 minimum I need to implement? Can I use struts-config.xml file to add
 some action as:

 actionpath="/admin/reloadLocal"
type="packageName.ReloadAction"/

 Thanks in advance.

 Maya




Re: Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null

2001-03-15 Thread Maya Muchnik

We are using javacvs for Unix. It is GUI similar Wincvs, you can select "binary file"
option.

Damien Joldersma wrote:

 hahahah isn't that just the way these really annoying problems are?  After
 working on this problem for like 2 days, and finally getting frustrated
 enough to write a letter, I solved it about 20 min after I wrote the letter.

 So just incase anyone else out there runs in to this problem be advised:

 "cvs add -kb" is WAY cooler for binary files than just "cvs add"!

 The problem was that the struts.jar file was checked into cvs on a linux box
 with out the -kb flag, then checked out with wincvs on the windows box, thus
 windows replaced all the newlines with carragie returns/line feed garbage
 and corrupted the file.  So! Be warned, becareful when putting binary files
 into CVS!

 -Damien Joldersma

 -Original Message-
 From: Damien Joldersma [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 14, 2001 3:58 PM
 To: [EMAIL PROTECTED]
 Subject: Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null

 Hello,

 We just started writing an application with tomcat and struts.  Our
 developers are developing on both windows and linux. We're running into a
 problem on the windows side of things with the taglibrary jazz.

 The problem is namely that tomcat is upset and is throwing an exception when
 we make a call to loading the taglib:

 %@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %

 This line throws the following exception:

 org.apache.jasper.compiler.CompileException: path snipped/globals.jsp(5,0)
 Unable to open taglibrary /WEB-INF/tlds/struts-bean.tld : null
 at
 org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
 ntListener.java, Compiled Code)
 at
 org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
 ener.java:116)
 at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled
 Code)
 at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled
 Code)
 at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462)
 at
 org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
 at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
 rvlet.java:152)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
 va:164)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled
 Code)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
 7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
 org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
 onnectionHandler.java:210)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
 Compiled Code)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
 Compiled Code)
 at java.lang.Thread.run(Thread.java:479)

 We are using tomcat 3.2 and Struts 1.0.

 The same code and war file work fine under linux.

 It looks like there is some problem with the windows configuration.  I've
 gone over the web.xml and have been unable to locate any problems
 (obviously!).  Here is the relavent bit from web.xml

 web-app
 servlet
 servelt-mapping
 welcome-file-list

  taglib
 taglib-uri/WEB-INF/tlds/struts-bean.tld/taglib-uri
 taglib-location/WEB-INF/tlds/struts-bean.tld/taglib-location
   /taglib
 /web-app

 If I move the file out of the way, the error changes properly to one where
 the system cannot find the file specified, so I know it's finding the file.
 I thought it may have been like a case where newline/carrage return
 corruption and replaced it with a fresh tld from the struts zip file
 distribution, no luck.

 Does anyone know where the error is being thrown? Where can I track down
 what error is supposed to being thrown? Has anyone run into a null error
 while trying to open a taglib?

 Thanks in advance for any help!

 -Damien Joldersma




Re: new problem - fixed one, now I've got another

2001-03-15 Thread Maya Muchnik


Take out from CP and CLASSPATH marked with red!!! And remove C:\ApacheGroup\Struts\\lib\struts.jar
file.
struts.jar file
must be ONLY under webapps/WEB-INF/lib for each yours application !!!

Jesse Vitrone wrote:
Maya,
Here's my classpath.CLASSPATH=C:\IBMDebug\lib\dertrjrt.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtime20;.;C:\SQLLIB\java\db2java.zip;
C:\SQLLIB\java\runtime.zip;C:\SQLLIB\java\sqlj.zip;.;.;C:\Xerces\xerces.jar;C:\Xalan\xalan.jar;C:\Xerces\xercesSamples.j
ar;C:\ApacheGroup\ApacheSOAP\lib\soap.jar;C:\ApacheGroup\ApacheSOAP\samples.jar;z:\unix_dobson\3rdparty\lib;z:\unix_dobs
on\gbapps;z:\unix_dobson\gbservlets;C:\Jars\servlet.jar;Z:\unix_dobson\gbapps\com\giantbear\soap;Z:\unix_dobson\gbapps\c
om\giantbear\soap\samples;Z:\unix_dobson\gbapps\com\giantbear\soap\test;c:\JavaMail\mail.jar;c:\JAF\activation.jar;C:\JD
BC\jdbc2_0-stdext.jar;C:\ApacheGroup\Ant\lib\ant.jar;C:\ApacheGroup\Ant\lib\jaxp.jar;C:\ApacheGroup\Ant\lib\parser.jar
CP is used along with CLASSPATH when I compile.CP=C:\ApacheGroup\Tomcat\lib\jaxp.jar;C:\ApacheGroup\Tomcat\lib\parser.jar;C:\jdk\lib\tools.jar;C:\ApacheGroup\Struts\\lib\struts.jarYes,
I can get the struts-example to run without a problem.I
have a bunch of struts.jar's, but they're all the same, and there's only
one under my 'my-example' directory.Thanks
again for your time and ideas,
Jesse



-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15,
2001 8:43 AM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another

Check how many struts.jar files you have. Did you try EXAMPLE? What is
your CLASSPATH?
Jesse Vitrone wrote:
The
error says this:javax.servlet.ServletException:
Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
Wouldn't
that imply that there should be a BEAN class in my struts.jar?If
not, where is it trying to find it?Thanks
again, Jesse

-Original
Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15,
2001 8:30 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: new problem -
fixed one, now I've got another
Yes, my struts.jar is in my WEB-INF\lib dir.
Thanks though,
 Jesse
-Original Message-
From: Young, Wayne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 8:26 AM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed one, now I've got another
Is struts.jar in in WEB-INF\lib? (you answered all of
Maya's questions
except that one)
Wayne
[EMAIL PROTECTED]

-Original Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 7:11 AM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed one, now I've got another
Ana - here's the soruce of the jsp that's getting the
errors. Anything look
wrong?
%@ page language="java" %>
%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"
%>
%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
%>
%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
%>
html:html locale="true">
head>
 title>
 bean:message key="generic.title"/>
 /title>
 html:base/>
/head>
logic:notPresent name="org.apache.struts.action.MESSAGE"
scope="application">
 font color="red">
 ERROR: Application resources not loaded
-- check servlet container
 logs for error messages.
 /font>
/logic:notPresent>
body bgcolor="white">
h2>center>bean:message key="index.welcome"/>/center>/h2>
blockquote>
 html:form action="/checkPrice" focus="isbn"/>
 bean:message key="index.prompt"/>
 html:text property="isbn" size="10"
maxlength="10"/>
 html:submit property="submit" value="Get
Price"/>
 /html:form>
/blockquote>
/html:html>
Thanks in advance,
 Jesse
-Original Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 5:25 PM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed one, now I've got another
OK, those are the 2 that I renamed, so I guess that's
not my problem.
Thanks for you help, I'll keep pluggin' away.
Jesse
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem - fixed one, now I've got another
Yes, you can replace the 2 names (in red color):
 !-- 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>org.apache.struts.example.ApplicationResources/param-value>
 /init-param>
 init-param>
 param-name>config/param-name>
 param-value>/WEB-INF/struts-config.xml/param-value>
Jesse Vitrone wrote:
That's exacly 

Re: new problem - fixed one, now I've got another

2001-03-15 Thread Maya Muchnik


You can keep struts.jar in CPat compiler time, not run-time. But
point to your_app/WEB-INF/lib dir.
Jesse Vitrone wrote:
Maya
et al:
Changing the html:form
...> tag fixed that other problem.
And my next problem,
the "javax.servlet.ServletException:
org.apache.struts.util.PropertyMessageResources" went
away when I got rid of my C:\ApacheGroup\Struts\lib\struts.jar
Why aren't I allowed to have the above file?!
How am I supposed to compile if I dont' have struts.jar somewhere in my
classpath? CP is only there at compile time, it's not there at run-time,
so I didn't think it would be an issue.Thanks
to all for your help - you guys and gals rule!!!Jesse

-Original
Message-----
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15,
2001 8:58 AM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another

Take out from CP and CLASSPATH marked with red!!! And remove C:\ApacheGroup\Struts\\lib\struts.jar
file.
struts.jar file
must be ONLY under webapps/WEB-INF/lib for each yours application !!!

Jesse Vitrone wrote:
Maya,
Here's my classpath. CLASSPATH=C:\IBMDebug\lib\dertrjrt.jar;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtime20;.;C:\SQLLIB\java\db2java.zip;
C:\SQLLIB\java\runtime.zip;C:\SQLLIB\java\sqlj.zip;.;.;C:\Xerces\xerces.jar;C:\Xalan\xalan.jar;C:\Xerces\xercesSamples.j
ar;C:\ApacheGroup\ApacheSOAP\lib\soap.jar;C:\ApacheGroup\ApacheSOAP\samples.jar;z:\unix_dobson\3rdparty\lib;z:\unix_dobs
on\gbapps;z:\unix_dobson\gbservlets;C:\Jars\servlet.jar;Z:\unix_dobson\gbapps\com\giantbear\soap;Z:\unix_dobson\gbapps\c
om\giantbear\soap\samples;Z:\unix_dobson\gbapps\com\giantbear\soap\test;c:\JavaMail\mail.jar;c:\JAF\activation.jar;C:\JD
BC\jdbc2_0-stdext.jar;C:\ApacheGroup\Ant\lib\ant.jar;C:\ApacheGroup\Ant\lib\jaxp.jar;C:\ApacheGroup\Ant\lib\parser.jar
CP is used along with CLASSPATH when I compile.
CP=C:\ApacheGroup\Tomcat\lib\jaxp.jar;C:\ApacheGroup\Tomcat\lib\parser.jar;C:\jdk\lib\tools.jar;C:\ApacheGroup\Struts\\lib\struts.jarYes,
I can get the struts-example to run without a problem.I
have a bunch of struts.jar's, but they're all the same, and there's only
one under my 'my-example' directory.Thanks
again for your time and ideas,
Jesse



-Original
Message-----
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15,
2001 8:43 AM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
Check how many struts.jar files you have. Did you try EXAMPLE? What is
your CLASSPATH?
Jesse Vitrone wrote:
The
error says this:javax.servlet.ServletException:
Cannot find bean org.apache.struts.taglib.html.BEAN in scope null
Wouldn't
that imply that there should be a BEAN class in my struts.jar?If
not, where is it trying to find it?Thanks
again, Jesse

-Original
Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15,
2001 8:30 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: new problem -
fixed one, now I've got another
Yes, my struts.jar is in my WEB-INF\lib dir.
Thanks though,
 Jesse
-Original Message-
From: Young, Wayne [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 8:26 AM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed one, now I've got another
Is struts.jar in in WEB-INF\lib? (you answered all of
Maya's questions
except that one)
Wayne
[EMAIL PROTECTED]

-Original Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 7:11 AM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed one, now I've got another
Ana - here's the soruce of the jsp that's getting the
errors. Anything look
wrong?
%@ page language="java" %>
%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"
%>
%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
%>
%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
%>
html:html locale="true">
head>
 title>
 bean:message key="generic.title"/>
 /title>
 html:base/>
/head>
logic:notPresent name="org.apache.struts.action.MESSAGE"
scope="application">
 font color="red">
 ERROR: Application resources not loaded
-- check servlet container
 logs for error messages.
 /font>
/logic:notPresent>
body bgcolor="white">
h2>center>bean:message key="index.welcome"/>/center>/h2>
blockquote>
 html:form action="/checkPrice" focus="isbn"/>
 bean:message key="index.prompt"/>
 html:text property="isbn" size="10"
maxlength="10"/>
 html:submit property="submit" value="Get
Price"/>
 /html:form>
/blockquote>
/html:html>
Thanks in advance,
 Jesse
-Original Message-
From: Jesse Vitrone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 5:25 PM
To: '[EMAIL PROTECTED]'
Subject: RE: new problem - fixed

reload configuration and transaction

2001-03-15 Thread Maya Muchnik

Hi,

If you remember we can use /admin/reload action to reload all
configuration files and beans, actions and so on. What happens if some
users are doing their transactions in the same time? Is the
ActionServlet is checking anything or not? Maybe a user will get an
error "Server unavailable" in the middle of a transaction? Maybe
"reload" option can be used only in a debug stage?

Thanks a lot for your patient,

Maya




Re: how to use Automatic Form Validation in this case ?

2001-03-15 Thread Maya Muchnik

I do not know an answer to your question. But a lot of examples and answers in
this email archive. Try to search for "iteration" or "iterate".
Here is a link:
http://www.mail-archive.com/struts-user@jakarta.apache.org/

"YOUSFI, Zahi" wrote:

 Hi all,
 I have an Action that create in the request scope a javabean.
 the action mapping for this action is a forward to a jsp.
 The javabean contains a vector of string and it is used in the jsp to create
 a select element in a form.
 When the ActionForm validate method is called the javabean is not any more
 valid.
 If there are errors the controller servlet will forward control back to the
 jsp.
 The jsp will not find the javabean to display the form properly.

 the first idea is to put the javabean in the session scope.

 Some one have an other idea?
 thx for help,

 Cordialement,

 Zahi YOUSFI
 Structis (GIE Informatique Bouygues Construction)
 Tl : 01 30 60 41 89 - Fax : 01 30 12 11 14
 [EMAIL PROTECTED]




Re: cannot load servlet name action

2001-03-15 Thread Maya Muchnik



Start from beginning. Stop Tomcat - Apache. Remove old struts-example directory.
Copy struts-example.war under tomcat/webapps directory. Remove tomcat/work/*
files. Remove struts.jar from CLASSPATH. Remove all other struts.jar files,
not under webapps/someapp/WEB-INF/lib. Startup Tomcat. You will see a lot
of messages at a console. From a browser run http://localhost:8080/struts-example.
Is this start successful?
Marc Antoine Garrigue wrote:
i have check and it is in it.The
fact is that even the example dosn't work...so..

- Original Message -

From:
Maya
Muchnik

To: [EMAIL PROTECTED]

Sent: Thursday, March 15, 2001 2:13
PM

Subject: Re: cannot load servlet name
action
This is ActionServlet that in struts.jar file. Do you try to start
some struts example? Check where this file is. It has to be under your_web_app/WEB-INF/lib.
Marc Antoine Garrigue wrote:

Hi everyone,Sorry
but i'm a kind of rookie newbieI have got this message when i start tomcat
(actually i have jboss_with_tomcat 3.2b7): cannot load
servlet name: action.I have try evrything and i'm going crazy...Anyone
can help??Thank uBelou







Re: cannot load servlet name action

2001-03-15 Thread Maya Muchnik



Try to find emails in our archives about JBoss and Tomcat... Maybe somebody
using JBoss will email to you...
Marc Antoine Garrigue wrote:
the truth is i haven't a tomcat-apache
but a tomcat-jboss server.so i can' t start it stand
alone...I have also tryed it as a stand alone server
and it works fine: i have a lot of things on my console and the application
works fine...The probleme is when i use embeded tomcat
with jbossThank u

- Original Message -

From:
Maya
Muchnik

To: [EMAIL PROTECTED]

Sent: Thursday, March 15, 2001 5:52
PM

Subject: Re: cannot load servlet name
action
Start from beginning. Stop Tomcat - Apache. Remove old struts-example
directory. Copy struts-example.war under tomcat/webapps directory. Remove
tomcat/work/* files. Remove struts.jar from CLASSPATH. Remove all other
struts.jar files, not under webapps/someapp/WEB-INF/lib. Startup Tomcat.
You will see a lot of messages at a console. From a browser run http://localhost:8080/struts-example.
Is this start successful?
Marc Antoine Garrigue wrote:
i have check and it is in it.The
fact is that even the example dosn't work...so..

- Original Message -

From:
Maya
Muchnik

To: [EMAIL PROTECTED]

Sent: Thursday, March 15, 2001 2:13
PM

Subject: Re: cannot load servlet name
action
This is ActionServlet that in struts.jar file. Do you try to start
some struts example? Check where this file is. It has to be under your_web_app/WEB-INF/lib.
Marc Antoine Garrigue wrote:

Hi everyone,Sorry
but i'm a kind of rookie newbieI have got this message when i start tomcat
(actually i have jboss_with_tomcat 3.2b7): cannot load
servlet name: action.I have try evrything and i'm going crazy...Anyone
can help??Thank uBelou









Re: logic:equal and nesting

2001-03-15 Thread Maya Muchnik


Do you need or not to have a statement /html:form> ?
Kyle Robinson wrote:
Here's
a piece of code that I want to do. However it gives a nested tag
error as the closing /logic:equal> tag ends up inside the html:form>.
I basically want the form to do different actions based on the property
"title". Anyone know of a better way of doing the same thing?logic:equal
name="supplierSearchBean" property="title"

scope="request" value="Contractor">
 html:form action="contractorSearch.do">
/logic:equal>
logic:equal name="supplierSearchBean"
property="title"

scope="request" value="Supplier">
 html:form action="supplierSearch.do">
/logic:equal>
Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111



Re: html:select multiple=true problem

2001-03-15 Thread Maya Muchnik


Several examples are in email archives (I have remembered that).
Kyle Robinson wrote:
Got
another problem. I have on a form a select that allows multiple selections.
However, I am getting a populate error when the multiple values are stuck
into my object. It is declared as an ArrayList. Anyone have
a code snippet they can provide to show how this is done?Kyle
Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111



Re: integer field

2001-03-15 Thread Maya Muchnik


The simplest way is to have this field as a String, and making a conversion
to String / Integer at ActionForm class.
Michael Wang wrote:

Does anyone know how to get rid of
default value of 0 from integer input field?
I would like to see empty field instead
of 0 inside.
Any help will be appreciated
.
Thanks
--Michael



Re: Another newbie question

2001-03-15 Thread Maya Muchnik

If all struts distributed examples work fine you do not need to worry. The
Bluestone site can use old distribution. Take care about only struts
examples. Understand how they work.

JOEL VOGT wrote:

 Hi,

 I am having troubles running the hello-world app from the struts trail
 map at http://developer.bluestone.com.
 The basic directory setup is this
 hello-world \WEB-INF\ lib   \ classes \ helloworld
 hello.jsp   struts-bean.tld struts.jar   HelloWorldResources.p.
 web.xml

 where HelloWorldResources.p = properties (just fitting on one line)

 I have one jsp, hello.jsp which just uses a bean:message to display a
 line from the properties file.

 Anyway, when ran in tomcat 3.2.1, I get the error 'cannot load servlet
 name: action'.
 This corresponds to my web.xml, which is just a normal descriptor.
 This error does not effect this simple example, but I think it is what
 is stuffing up my others.
 Any help on the cause/remedy of this?
 When running a sample logon app, I get errors such as could not find
 ActionBean and ActionForward etc
 All the example apps distributed with struts work fine.

 Any help appreciated.
 Thanks, Joel.




Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:

OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
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.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
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)
Does this look familiar to anyone?
Thanks in advance,
 Jesse



Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Check a location of all struts-*tld files. They have to be under your_app/WEB-INF
(check with your web.xml). struts.jar file has to be under your_app/WEB-INF/lib.
Put your first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp
Jesse Vitrone wrote:
Good
idea, but it didn't help, I still got the same directory.Thanks
anyway,
Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another

Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:

OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
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.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
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)
Does this look familiar to anyone?
Thanks in advance,
 Jesse





Re: new problem - fixed one, now I've got another

2001-03-14 Thread Maya Muchnik


Yes, you can replace the 2 names (in red color):
 !-- 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>org.apache.struts.example.ApplicationResources/param-value>
 /init-param>
 init-param>
 param-name>config/param-name>
 param-value>/WEB-INF/struts-config.xml/param-value>
Jesse Vitrone wrote:
That's
exacly the setup that I have :)*.tld
and my web and config xml files are in my_app/WEB-INFand
my 2 jsp's are under my_app/http://localhost/my_app/index.jsp
is what's giving me that error.I
have Apache with Tomcat, so the :8080 isn't needed.Any
other ideas?The
config xml and resource properties file can be named what ever I want,
right? As long as I refer to them with the right name in my web.xml?Thanks
again,
Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 5:00 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another

Check a location of all struts-*tld files. They have to be under your_app/WEB-INF
(check with your web.xml). struts.jar file has to be under your_app/WEB-INF/lib.
Put your first.jsp file under your_app directory and try http://localhost:8080/your_app/first.jsp
Jesse Vitrone wrote:
Good
idea, but it didn't help, I still got the same directory.Thanks
anyway, Jesse

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14,
2001 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: new problem -
fixed one, now I've got another
Try to stop Tomcat. Remove everything under tomcat/work directory and startup
Tomcat again.
Jesse Vitrone wrote:

OK, I fixed the other properties file problem, it turned
out that I had a syntax error in my web.xml and I didn't see Tomcat barf
when it loaded.
Now that I've fixed that, and Tomcat doesn't give any
error when it starts, I get this error when I try to load my first page.
javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN
in scope null
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at _0002findex_0002ejspindex_jsp_1._jspService(_0002findex_0002ejspindex_jsp_1.java:315)
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.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
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)
Does this look familiar to anyone?
Thanks in advance,
 Jesse







Re: How to generate a form bean manually?

2001-03-14 Thread Maya Muchnik

It is my guess. Take as example logon.jsp and registration.jsp. The
first jsp uses a part of info for the second jsp (or form). I think you
need to have 2 form beans, one for fill in parameters, other one - for
full object.

John Chang wrote:

 Usually, a form bean is automatically created after a
 user submit the form at the first time.  But if I want
 to generate the form bean before the form is shown,
 how can I do that?

 The reason for me to do so is for this case: some
 information of the form are already in database.  When
 users fill the form, they don't have to input these
 information.

 Another question, how can I get the instance of the
 form bean in my JSP file?

 Thanks a lot!

 John Chang

 __
 Do You Yahoo!?
 Yahoo! Auctions - Buy the things you want at great prices.
 http://auctions.yahoo.com/




Re: forwarding to original page

2001-03-12 Thread Maya Muchnik

You can check with Validator  05. release :
http://home.earthlink.net/~dwinterfeldt/
It has a multiple language error support.
Maya
P.S. Is any connection your site with http://explorer.msn.com

Fred Lo wrote:

 Hello all,

 I have an application that contain support for multiple languages, we opt
 for the multiple language/multiple jsp option, where each language of the
 system will contain its own set of jsp.

 We now have a problem that during validation, when there is an error, we
 would like the page forwarded back to the original jsp (of the originating
 language). But right now the mapping only allow us to define one input form,
 so upon looking at the source file, I think we can redefine
 processValidate() of ActionServlet a bit, instead of getting the input form
 from the mapping, we can get it from a parameter:

 // Has an input form been specified for this mapping?
 String uri = (request.getParameter(Constants.INPUT_FORM));
 if (uri == null || uri.equals(""))
 { uri = mapping.getInput(); }
 

 The idea is like this, is our approach correct? (pls don't say we shouldn't
 have a duplicate set of jsp) Or there is some better way to achieve that?

 Thanks a lot.

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




Re: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Maya Muchnik

David,

Please clarify for me. I am trying use your application for validation and display
different error depending on a selected language. It is 05 release. Your
RegistrationAction.java or MultiRegistrationAction.java calls
Locale locale = getLocale(request);
but it is not used in the source code (directly). Maybe I am missing something. Your
have 2 properties files depending on the language. Does MessageResources use them?

Thanks,

Maya

David Winterfeldt wrote:

 From your action class you can call.

 MessageResources messages = getResources();
 String message = messages.get(locale, "resource.key");

 See the API docs for all of the different ways to
 retrieve a message resource.
 http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html

 David

 --- Mikael Eriksson [EMAIL PROTECTED] wrote:
  Hello,
 
   I think that the best thing to do would be to not
  use the text of
  the button at all. If you use the text you will need
  to change the
  code as well if you decide to change the text on the
  button by
  editing the property file. (And if you get
  internationalization into
  the picture it will be even worse.)
 
  I think the solution would be to have different
  names on the
  buttons (using the 'property' attribute of the
  html:submit tag) and
  check the button used by having properties for all
  the possible names
  in the Form bean and see which property that is
  different from null.
  (Or by doing a request.getParameter() as you do in
  your example, but
  I like the automatic way better :-) )
 
  The downside of that is of course that you need
  extra properties in the
  Form bean class but I still think it will be worth
  it.
 
   To come back to the original question I do not know
  how to do it
  but I guess that it would be possible to find by
  checking the source
  of the bean:message tag.
 
   Regards
   Mikael
 
 
 
 
  Martijn Spronk wrote:
 
   Hi all,
  
   I'm pretty new to struts, and just started
  developing a fairly
   simple app, however taking a bit beyond the
  standard example functionality.
  
   I have a (probably) pretty simple question:
   I'm in the perform method of the Action class,
  processing a form submit, but
   want to
   forward to different mappings depending on which
  button was pressed.
   In the JSP I am using the
  ApplicationResources.properties file to create the
   button text for the
   different buttons, so now I need to access this
  text also to determine which
   action to
   take.
  
   So how do I access the descriptions from the
  properties file in the Action
   class?
  
   my form:
   ---
   tr
  td colspan="5" align="right"
 html:submit styleClass="bodyform"
   bean:message key="button.cancel"/
 /html:submitnbsp;/td
  td
 html:submit styleClass="bodyform"
   bean:message key="button.edit"/
 /html:submitnbsp;/td
  td
 html:submit styleClass="bodyform"
   bean:message key="button.confirm"/
 /html:submit/td
 /tr
   ---
  
   So what do I put at the ... in the following
  fragment of the perform()
   method to
   be able to get the textual value of the
  button.cancel and button.edit?
   ---
   String submit = request.getParameter("submit");
   // Forward control depending on which button was
  pressed
   if (submit.equals(...))
   return (mapping.findForward("cancel"))
   else if (submit.equals(...))
   return (mapping.findForward("edit"))
   ---
  
   Thanks,
   Martijn.
 

 __
 Do You Yahoo!?
 Yahoo! Auctions - Buy the things you want at great prices.
 http://auctions.yahoo.com/




how to config Tomcat for debugger

2001-03-09 Thread Maya Muchnik

Hi,

Does anyone configure Tomcat to accept debugger connections? For
example, if I am using JBuilder, Forte or Visual Cafe that has a
built-in debugger, then how to do this?

Thanks in advance.

Maya




Re: user time-zone

2001-03-09 Thread Maya Muchnik

Sorry folks, for this thread, because it does not "concerns" the struts
directly (some designing issue).

Nanduri,

You can not consider an offset as a correct reference to time zone. For
example, Cairo - has +2 hours from GMT, Helsinki - the same +2 hours, Israel -
+2 hours. They are all in different time zones!

Maya

"Nanduri, Amarnath" wrote:

   Keep all the timezone offsets in a database. Send a hidden field to the
 client which maps the region he/she is in (using Javascript ?). Depending on
 the region, hit your database and get the time zone offset from your
 database.

 cheers,
 Amar..

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 5:04 PM
 To: [EMAIL PROTECTED]
 Subject: Re: user time-zone

 I have got a response from my colleagues, that the time offset can not be
 used
 to establish correct time zone. The offset depends on a season and other
 factors. A user can change a time zone through "Date/Time Properties" window
 for NT. It means you need to ask the user what time zone he  / she wants to
 use.

 Peter Alfors wrote:

  oops,
  should be a lowercase 'z'
 
  getTimezoneOffset()
 
  Peter Alfors wrote:
 
   I have not tried this yet, but according to the books, it should work.
  
   function getTimeZoneOffset()
   {
 var date = new Date();
 var offset = date.getTimeZoneOffset();
 alert(offset);
   }
  
   This is the offset (in minutes) from GMT/UTC.
  
   HTH,
   Pete
  
   Maya Muchnik wrote:
  
Please, provide a javascript code how to do this.
   
Peter Alfors wrote:
   
 It appears that the time-zone offset could be retrieved via
 javascript
 on a startup page, then entered in to the users session through an
 action class / hidden field combo.

 Its ugly, but it would work.

 Any better ideas?




Re: Gratitude

2001-03-09 Thread Maya Muchnik

Welcome a "board", John. We are all gratefully happy that we have Struts and
its developers / contributors.
Maya

John Wright wrote:

 Struts developers and other contributors,

 I have been working several months on a project and was really getting
 nowhere.  I had implemented my own MVC framework based on some usely
 assorted ideas mostly from JavaWorld articles.  Then I found Struts
 yesterday.  It blew me away.  I intuitively knew right away that it was the
 right architecture and would save me tons of time by allowing me to avoid
 that tedious JSP programming that was bogging me down.  I know letters like
 this don't help anyone to learn more about Struts but I felt like I have to
 say thanks.  This is one of the best and most well documented frameworks I
 have ever seen.  I dreamt about Struts last night. :)  Maybee now I can get
 back to 8 hour days and time to take a walk in the woods and watch the
 beautiful spring come in (I am not exaggerating).

 I will try to repay what I get from Struts by contributing to this list.  I
 am a really fast learner of frameworks.  That is at least one of my skills.

 John Wright
 Kansas City, MO

 P.S.  I am already about 75% to where I had been in several months with just
 one day of Struts.  What does that say for Struts!




Re: user time-zone

2001-03-09 Thread Maya Muchnik

Amar, (I am sorry for a mix up with your last name)

Maybe you are correct. My point is time zone and offset are two different
measures. You cannot calculate a time zone if you know an offset. But you can
calculate the offset if you know the time zone.

Maya

"Nanduri, Amarnath" wrote:

 Maya,

   It all depends on your design and the project you are working on. Let
 me give you an example...

 If lets say i have locations in different parts of the world and i
 want to reserve tickets for those Locations. I already know the timezone the
 Location is present (since a location can't change. If a Location changes
 then i have no answer and i leave it to the experts to answer that
 question). I simply store the offsets with reference to GMT in my database.
 If the user selects a particular Location i know the correct offset and
 timezone.

 Am i making sense ?

 Amar..

 -Original Message-----
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 09, 2001 10:13 AM
 To: [EMAIL PROTECTED]
 Subject: Re: user time-zone

 Sorry folks, for this thread, because it does not "concerns" the struts
 directly (some designing issue).

 Nanduri,

 You can not consider an offset as a correct reference to time zone. For
 example, Cairo - has +2 hours from GMT, Helsinki - the same +2 hours, Israel
 -
 +2 hours. They are all in different time zones!

 Maya

 "Nanduri, Amarnath" wrote:

Keep all the timezone offsets in a database. Send a hidden field to the
  client which maps the region he/she is in (using Javascript ?). Depending
 on
  the region, hit your database and get the time zone offset from your
  database.
 
  cheers,
  Amar..
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 08, 2001 5:04 PM
  To: [EMAIL PROTECTED]
  Subject: Re: user time-zone
 
  I have got a response from my colleagues, that the time offset can not be
  used
  to establish correct time zone. The offset depends on a season and other
  factors. A user can change a time zone through "Date/Time Properties"
 window
  for NT. It means you need to ask the user what time zone he  / she wants
 to
  use.
 
  Peter Alfors wrote:
 
   oops,
   should be a lowercase 'z'
  
   getTimezoneOffset()
  
   Peter Alfors wrote:
  
I have not tried this yet, but according to the books, it should work.
   
function getTimeZoneOffset()
{
  var date = new Date();
  var offset = date.getTimeZoneOffset();
  alert(offset);
}
   
This is the offset (in minutes) from GMT/UTC.
   
    HTH,
Pete
   
Maya Muchnik wrote:
   
 Please, provide a javascript code how to do this.

 Peter Alfors wrote:

  It appears that the time-zone offset could be retrieved via
  javascript
  on a startup page, then entered in to the users session through an
  action class / hidden field combo.
 
  Its ugly, but it would work.
 
  Any better ideas?




Re: [INFORMATIONAL] Javasoft J2EE Patterns Catalog

2001-03-09 Thread Maya Muchnik



It is very easy to become a member. But nobody can distribute this document
(a license issue).
Maya
"Deadman, Hal" wrote:
Has
anyone found a place to download this pattern catalog? It would be nice
to have a local copy in either PDF or HTML.This
link has the on-line version but you need to be logged in to JDC.http://developer.java.sun.com/developer/restricted/patterns/J2EEPatternsAtAGlance.htmlHal

-Original
Message-
From: Philip Hart [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08,
2001 11:41 PM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: [INFORMATIONAL] Javasoft
J2EE Patterns Catalog

Hi AllJavasoft
have just released a J2EE Patterns Catalog (http://www.javasoft.com/features/2001/03/patterns.html)
To quote:The
Sun Java Center has just released, in beta form, the J2EE Patterns
Catalog to the development community via the Java
Developer ConnectionSM
(JDC) program. The 15 included J2EE Patterns represent
more than three years of work by the Sun Java Center, and contain J2EE
platform solutions for common problems experienced by architects using
Java technology. The J2EE Patterns Catalog reflects the collective expertise
and the experience of architects using Java technology in the Java Center
over the past three years.Definitely
worth a look, as it has the sort of patterns - Front Controller and Dispatcher
for example - which we know and love in Struts.Happy
Reading,Philip
Hart






Re: My struts-template is broken

2001-03-08 Thread Maya Muchnik

Hi,
I have the similar result for Tomcat 3.1. But I do not have the problem with
the Cerdric's "Components". Why do they react different?
Maya

Tom Miller wrote:

 Turned out the problem was using Tomcat 3.1, templates seem to work properly
 with Tomcat 3.2.1.

 Tom Miller wrote:

  Whew! Somehow or other my 1.0b1 struts-template webapp is refusing to
  place the header, sidebar, content and footer in their respective places
  as per the template. Instead these components are placed one after
  another vertically down my browser page.
 
  I've redeployed the 1.0b1 struts-template.war, rebooted Tomcat, rebooted
  the machine, started over. Tried Netscape and IE5. Even replicated the
  process on another computer. Does anyone know why this might happen? It
  may a cockpit error, but I'm at a loss. I think I saw it working
  correctly the first time I looked at it today, but now I'm doubting that
  memory.
 
  TIA
  --
  Tom Miller
  Miller Associates, Inc.
  [EMAIL PROTECTED]
  641.469.3535 Phone
  413.581.6326 FAX

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




Re: struts, tomcat and own JNDI service provider

2001-03-08 Thread Maya Muchnik


Roland,
I think, you can specify JNDI provider in env.put
statements.
Or alternative way to set the following lines in jndi.properties file
(marked with red - replace with your implementation):
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
java.naming.factory.url.pkgs=your_path
Maya
Roland Huss wrote:
Ahoi,
I have a problem with tomcat 3.2.1, stuts, Jdk 1.3 and JNDI. In our
struts application we are using an own JNDI provider for looking up
plugins. However, since we are using JDK 1.3, which includes the
javax.naming packages itself, they are always loaded by the system
classloader. Hence, our very own JNDI-SP residing below
WEB-INF/classes is not found and an ClassNotFound exception is
thrown. Putting jndi.jar from sun into WEB-INF/lib doesn't work,
either. The only solution we came up so far was to put all out application
classes and struts.jar into tomcat's CLASSPATH, which is really a bad
idea.
Are there any other, better ways to get tomcat to load the
javax.naming packages with the webapp-class loader ?
thanx, cu...
--

...roland huss

consol.de
[ The subject might be slightly off-topic. But since there has
been already some extensive discussion on classloaders in this list
and
the problem also concerns any struts app using own JNDI-provider with
tomcat, I hope I'm not too far away from the list. ]



Re: ActionForm question (repost)

2001-03-08 Thread Maya Muchnik

Brian,
I think, the best way to have a bean with String properties, and
corresponding form. When you perform data checking convert there to a number
if this field has to be a number. If validation is OK, put to database
converted data.
Maya

Bryan Field-Elliot wrote:

 Question reposted (never got any responses) -- please respond, someone :)

 Question about creating ActionForm beans --

 What kinds of data types are supported? I could not find a reference to
 this in the docs. For example, I want to have an input box on my forms,
 where the user can enter a number. Or, they can leave it blank. I want
 "blank" to show up as null, not zero. Should I implement my ActionForm
 bean as follows?

 Integer qty;

 Integer getQty() { return qty; }
 void setQty(Integer) { this.qty = qty; }

 I've chosen Integer because it can hold a value, OR it can be null
 (which is the behavior I'm looking for).

 Will this work, or must I restrict my data types to Strings and do
 conversion somewhere else?

 Thanks,
 Bryan




Re: Need one example ...

2001-03-08 Thread Maya Muchnik

If you are using struts 1.0 you have several examples, including
struts-example.war with a source code provided.

Raymond wrote:

 Hi,

 Can someone give me an example to pass a parameter with struts-form.tld.

 Thanx,

 Raymond




FYI: disable Javascript in IE

2001-03-08 Thread Maya Muchnik

Hi,
I remember, that somebody told me that disabling JavaScript is possible
only in Netscape. I have found out (through Netscape site) how to
disable JavaScipt in IE: go to Tools-Internet Options-Security-Custom

Level-Scripting-Active scripting (disable, enable, prompt). But after
you change setting and want to save with the "OK" button, IE hangs. You
need to terminate the task. When you start IE again, you can see, that
the change was saved.

Maya




Re: Question about PropUtils.copyProperties()

2001-03-08 Thread Maya Muchnik

All getters and setters have to follow a JavaBean convention. This means
you can have getCc_number(), not getcc_number(). The second thing the
properties names have to match (case sensitive) in a source and destination
beans.

Bryan Field-Elliot wrote:

 Question -- in evaluating names of properties (get/setter methods), does
 it do a case-INsensitive match, or case-sensitive?

 Due to the tool I'm using, some classes have method names like:

 getcc_number()
 putcc_number()

 while others will have it as:

 getCc_number()
 putCc_number()

 Will these be considered a "match" by the copyProperties() function?

 Thanks,
 Bryan




Re: disable Javascript in IE

2001-03-08 Thread Maya Muchnik

I have IE 5.00, and I did not wait a lot.

"Nanduri, Amarnath" wrote:

   IE does not hang for me.

 -Original Message-----
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 08, 2001 3:25 PM
 To: [EMAIL PROTECTED]
 Subject: FYI: disable Javascript in IE

 Hi,
 I remember, that somebody told me that disabling JavaScript is possible
 only in Netscape. I have found out (through Netscape site) how to
 disable JavaScipt in IE: go to Tools-Internet Options-Security-Custom

 Level-Scripting-Active scripting (disable, enable, prompt). But after
 you change setting and want to save with the "OK" button, IE hangs. You
 need to terminate the task. When you start IE again, you can see, that
 the change was saved.

 Maya




Re: user time-zone

2001-03-08 Thread Maya Muchnik

Please, provide a javascript code how to do this.

Peter Alfors wrote:

 It appears that the time-zone offset could be retrieved via javascript
 on a startup page, then entered in to the users session through an
 action class / hidden field combo.

 Its ugly, but it would work.

 Any better ideas?




Re: user time-zone

2001-03-08 Thread Maya Muchnik

I have got a response from my colleagues, that the time offset can not be used
to establish correct time zone. The offset depends on a season and other
factors. A user can change a time zone through "Date/Time Properties" window
for NT. It means you need to ask the user what time zone he  / she wants to
use.

Peter Alfors wrote:

 oops,
 should be a lowercase 'z'

 getTimezoneOffset()

 Peter Alfors wrote:

  I have not tried this yet, but according to the books, it should work.
 
  function getTimeZoneOffset()
  {
var date = new Date();
var offset = date.getTimeZoneOffset();
alert(offset);
  }
 
  This is the offset (in minutes) from GMT/UTC.
 
  HTH,
  Pete
 
  Maya Muchnik wrote:
 
   Please, provide a javascript code how to do this.
  
   Peter Alfors wrote:
  
It appears that the time-zone offset could be retrieved via javascript
on a startup page, then entered in to the users session through an
action class / hidden field combo.
   
Its ugly, but it would work.
   
Any better ideas?




Re: bundle param in message tag

2001-03-08 Thread Maya Muchnik


In struts-example you can find web.xml file (under WEB-INF) directory.
A part of this file:
...
 !-- 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>org.apache.struts.example.ApplicationResources/param-value>
 /init-param>
...
You need to replace ApplicationResources with your file.
Maya
Ratnadeep Bhattacharjee wrote:
Hi,
I was wondering if someone could please help me with this problem:
I have created my own properties file called "Resources.properties"
and it is
located in WEB-INF/classes/com/x/y/resources.
I am tring to use it in a jsp page as follows:
%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
some HTML here
form:form action="general.do" name="GeneralForm"
scope="request" type="com.x.y.GeneralForm">
some HTML here...
 bean:message
 bundle="com.x.y.resources.Resources"
 key="role_name_rev"/>
some more HTML ...
/form:form>
/body>
/form:html>
I am getting the following error:
2001-03-08 05:29:21 - Ctx( /smc ): Exception in: R( /smc +
/usermgr/roles/general.jsp + null) - javax.servlet.ServletException:
Missing
resources attribute com.x.y.resources.Resources
 at java.lang.Throwable.fillInStackTrace(Native
Method)
 at java.lang.Throwable.fillInStackTrace(Compiled
Code)
 at java.lang.Throwable.init>(Compiled
Code)
 at java.lang.Exception.init>(Compiled
Code)
 at javax.servlet.ServletException.init>(ServletException.java:161)
Is there any place else I need to enter information about this resource
file for
it to be found?
Thanks,
-Deep.



Re: Article on struts

2001-03-04 Thread Maya Muchnik

Hi,
No link.

Incze Lajos wrote:

 Yet another article on Struts. You won't believe it ...




Re: Cannot deploy struts-blank.war onto j2eesdk1.2.1

2001-03-02 Thread Maya Muchnik


With jdk 1.3 it works 100%.
Thai Thanh Ha wrote:
I
can't deploy struts-blank.war (struts 1.0b1) onto j2eesdk1.2.1 . Has anyone
done it before? Please help me!



for users of WebLogic server

2001-03-02 Thread Maya Muchnik

Here is a link to WebLogic / Bea site to find some info (setting up
WebLogic for JSP, troubleshooting):
http://www.weblogic.com/docs51/classdocs/API_jsp.html





Re: PROPOSAL: Template Screens

2001-03-01 Thread Maya Muchnik
ents project, which can be seen as an extension of Templates.
 Screens are defined in a configuration file. You can also have different
   configuration files for different Locale : appropriate screens will be loaded
   according to user Locale.
 There is also an "inheritance"  mechanism allowing a screen to extend
   another screen : you define your main screen, and derived other screens from
   it, only changing what is relevant.
 To no more about Components :
   (main site) http://www.lifl.fr/~dumoulin/components/
  (mirror)  http://www.geocities.com/cedricdumoulin//components
  
 I am currently rewriting part of the code to allows easy addition of other
   "configuration file reader". Like this, it will be possible to load instances
   from, for example, a database. This will also allows dynamic change of
   instances. Code rewriting will not affect actual  tags syntax.
  
  Cedric
  
   Maya Muchnik wrote:
  
Hi,
I think the screen configuration through a xml-file is made in Components
project (see for example,
componentInstances.xml file). It is very convenient. As you maybe know,
the project extends ActionServlet class.
Maya
   
David Geary wrote:
   
 Yes, that's a good idea, applicable for static screens.

 We should still allow for programmatic definitions, though. Servlets or
 servlet filters are good candidates for creating dynamic screen
 definitions.

 david

 Wong Kok Wai wrote:

  Is it possible to define the screen definition in the
  struts-config.xml? I think this will be more flexible.
 
  __
  Do You Yahoo!?
  Get email at your own domain with Yahoo! Mail.
  http://personal.mail.yahoo.com/




Re: debug level

2001-03-01 Thread Maya Muchnik

The 2nd part (classpath) is coming from Tomcat (or other server) startup
script.

 Hi there,

 how can I prevent the struts action servlet from logging so much
 information.

 Here is my problem: I have generated a struts application and now I am
 about to
 deploy it. During development it was pretty convenient to have so many
 debug
 messages. But now, even after setting the debug level to 0, the
 ActionServlet
 still prints out too much debug information:

  ...
  2001-03-01 05:10:14 - JspEngine -- /logon.jsp
  2001-03-01 05:10:14 -ServletPath: /logon.jsp
  2001-03-01 05:10:14 -   PathInfo: null
  2001-03-01 05:10:14 -   RealPath:
 /home/hias/tomcat/webapps/nmi-registration/logon.jsp
  2001-03-01 05:10:14 - RequestURI: /nmi-registration/logon.jsp
  2001-03-01 05:10:14 -QueryString: null
  2001-03-01 05:10:14 - Request Params:
  2001-03-01 05:10:14 -nickname = asfsafasfsa
  2001-03-01 05:10:14 -password = asfsafa
  2001-03-01 05:10:14 -submit = Anmelden

---


  2001-03-01 05:10:14 - Classpath according to the Servlet Engine is:
 /home/hias/tomcat/webapps/nmi-registration/WEB-INF/classes:/home/hias/to
 mcat/webapps/nmi-registration/WEB-INF/lib/java-db-framework.jar:/home/hi
 as/tomcat/webapps/nmi-registration/WEB-INF/lib/components.jar:/home/hias
 /tomcat/webapps/nmi-registration/WEB-INF/lib/struts.jar
  ...

 Can somebody help me to suppress that many debug info?

 Any help is very much appreciated.

 Thanks,
 --- Matthias




Re: debug level

2001-03-01 Thread Maya Muchnik

I think I have found the answer for the 1st part of debug messages. They are
coming from jasper compiler.

Maya Muchnik wrote:

 The 2nd part (classpath) is coming from Tomcat (or other server) startup
 script.

  Hi there,
 
  how can I prevent the struts action servlet from logging so much
  information.
 
  Here is my problem: I have generated a struts application and now I am
  about to
  deploy it. During development it was pretty convenient to have so many
  debug
  messages. But now, even after setting the debug level to 0, the
  ActionServlet
  still prints out too much debug information:
 
   ...
   2001-03-01 05:10:14 - JspEngine -- /logon.jsp
   2001-03-01 05:10:14 -ServletPath: /logon.jsp
   2001-03-01 05:10:14 -   PathInfo: null
   2001-03-01 05:10:14 -   RealPath:
  /home/hias/tomcat/webapps/nmi-registration/logon.jsp
   2001-03-01 05:10:14 - RequestURI: /nmi-registration/logon.jsp
   2001-03-01 05:10:14 -QueryString: null
   2001-03-01 05:10:14 - Request Params:
   2001-03-01 05:10:14 -nickname = asfsafasfsa
   2001-03-01 05:10:14 -password = asfsafa
   2001-03-01 05:10:14 -submit = Anmelden

 ---

 
   2001-03-01 05:10:14 - Classpath according to the Servlet Engine is:
  /home/hias/tomcat/webapps/nmi-registration/WEB-INF/classes:/home/hias/to
  mcat/webapps/nmi-registration/WEB-INF/lib/java-db-framework.jar:/home/hi
  as/tomcat/webapps/nmi-registration/WEB-INF/lib/components.jar:/home/hias
  /tomcat/webapps/nmi-registration/WEB-INF/lib/struts.jar
   ...
 
  Can somebody help me to suppress that many debug info?
 
  Any help is very much appreciated.
 
  Thanks,
  --- Matthias




Re: Is the struts example itself is multi-thread safe?

2001-03-01 Thread Maya Muchnik

Thank you, Craig for clear "picture".

One Q. to be sure that all OK. What about servlet.log file? Several action threads 
will need to have an access to it.,...

Maya

"Craig R. McClanahan" wrote:

 Maya Muchnik wrote:

  Hi,
 
  In "A Walking Tour of the Struts App", the author has mentioned that "There is 
only one object for each action (URI), so your action objects must be
  multi-thread safe". Is the example itself is multi-thread safe?
  I am asking this, because are several actions here, but not one of them use 
"synchronized" statement.
 
  Maybe I am missing something...
 

 Possibly.

 Thread-safety is a general term meaning "even if two or more users are calling 
methods in my class *simultaneously*, nothing will get messed up.

 In the case of Action classes in the example application, they are indeed thread 
safe.  Why?  Primarily because they use no instance variables -- only
 local variables within the perform() method.

 If the example used instance variables, then there would be only one copy of those 
variables (because Struts creates only one instance of your Action).
 However, local variables appear on the stack for each request thread that is 
happening simultaneously.  Any single thread can only see its own copy of
 these variables, so there is no possibility for contention.

 One place you will see synchronization in the example app is when adding to the 
pseudo-database.  Consider what would happen if two users logged on with
 the same id, and both proceeded to add a new subscription at exactly the same 
moment.  You would have two attempts to modify the database (which,
 because it is a servlet context attribute, is visible to all request processing 
threads), so you need to synchronize here.

 The other place that you commonly need to synchronize is when you are modifying 
session attributes (read-only access is generally safe without
 locking).  It is surprisingly easy to have multiple requests active at the same time 
for the same session -- for example:

 * In a framed presentation, the browser will often issue
   requests for more than one frame at the same time, all
   with the same session id.

 * Users might open multiple browser windows, which (in
   many circumstances) causes each window to be part
   of the same session.

 * The user can submit a long running transaction, press
   STOP (which the server does not know about), and then
   start something else.

 
  THANKS in advance.
 
  Maya

 Craig




Re: Why should you call JSP pages directly?

2001-03-01 Thread Maya Muchnik

One way, as I know, is to put all jsp, except index.jsp (or similar start up)
under a protected directory. For Tomcat the secure directory is setup in web.xml
(see web.xml for webapps/example, directory is example/jsp/security/protected).
See also Tomcat instruction (I need refresh my memory myself).

The other ways are in the email achieves:
Q, and A http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03611.html

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03684.html
(I am not sure that I know how to do this)

Q and A. http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03737.html



John Raley wrote:

 So how does one protect JSP's from direct invocation?  Is there a
 server-independent way?  (I'm using Tomcat, so that would also be good to
 know.)

 Maya Muchnik wrote:

  Hello, Jens again,
  I am totally agree with you, but to make it works somebody (a designer) must
  to "protect" jsp files. Several people told me how to do this. About logic
  JSP again it is the designer question. Of course, it is better to have JSP
  only for view. Sometimes, it is difficult, and required everything to be
  redesigned.
  Maya
 
  Jens Rehphler wrote:
 
   Hallo Maya,
  
   Maya Muchnik wrote:
  
Hi, Jens,
When I had asked a question about calling jsp directly, I was concerned,
that a user can see a directory or see a link (as I do) and call this
jsp directly from a browser query / input line. The user likes to
experiment.
That is all. He does not know what is a view jsp or logic jsp.
  
   That is the point: a user should never have the possibility to come in
   contact with a JSP. And a JSP should never contain any business logic.
  
   Jens




HTTPClient vs java.net.URLConnection

2001-03-01 Thread Maya Muchnik

Hi,
Does anyone use HTTPClient? What do you think about it? I have got this link several
minutes ago.
As its document said, in HTTPClient you can set timeout for response, pipelining of
request. Source code is available. It includes the source code for parsing the
multiPartRequest.

HTTPClient can find at:
http://www.innovation.ch/java/HTTPClient/






Re: :misssig message key error

2001-03-01 Thread Maya Muchnik

Your index.jsp file is using ApplicationResources.properties to get
index.title. Check it.

soh syed wrote:

 can anyone help me with the following error!
 thanks

 Missing message for key index.title
 at
 org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
 at _0002findex_0002ejspindex_jsp

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




Re: JSP includes of

2001-03-01 Thread Maya Muchnik

Try to change jsp:include page="include/header.jsp"/ to put a full path to
header.jsp file. For example:
jsp:include page="/WEB-INF/include/header.jsp"/. But I am not sure.

Katarina Nelson wrote:

 Try to include the needed .tld files into the "include/header.jsp" page.
 It worked for me.

 /Katarina

 -Original Message-
 From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
 Sent: den 1 mars 2001 22:29
 To: '[EMAIL PROTECTED]'
 Subject: JSP includes of

 I am having trouble using includes and custom tags in JSPs with Struts.

 The application is unable to find the tag descriptor files. For example, I
 have an include file that contains:

 // header.jsp
 %@ page language="java" %
 %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %
 %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %
 %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %

 and call it in the JSP:
 jsp:include page="include/header.jsp"/

 The .tld files can not be resolved. The include directory is one level under
 the JSP and I have tried different paths to the .tld files with no success.
 How can I get this to work if at all?

 Solutions are appreciated.




  1   2   >