Re: must restart tomcat

2001-02-14 Thread gustav spellauge

i just downloaded and installed tomcat 4.0 - the examples work fine

BUT there seem to be a problem with struts - *.tld has changed ? i get the error:

apache.jasper.JasperException: XML parsing error on file /WEB-INF/struts-html.tld:
(line 2, col -1): Element type "document" is not declared.
 at org.apache.jasper.compiler.JspUtil.parseXMLDocJaxp(JspUtil.java:225)
 at org.apache.jasper.compiler.JspUtil.parseXMLDoc(JspUtil.java:198)

how to fix this ?

thanks in advance

g.


Tom Janofsky wrote:

> Just FYI - it's not that hard.
>
> toolkits to get this info
>  http://www.inf.fu-berlin.de/~dahm/JavaClass/ (lgpl'd byte code tools)
> or
>  CFParse from IBM alphaworks
>  (both can be used the get all the classes used by a class)
>
> some tools that do this sort of thing...
>  http://vorlon.eecs.cwru.edu/~jrl7/java/ImportMin.txt (tells you what
> you need to import)
>  Dash-o also does something like this to clean up imports, and
> woodenchair's Utility+
>
> Although I'd bet my $.02 that all tomcat 4.x does is watch timestamps on
> all the files under classes.
>
> And slightly OT - wasn't life nice and simple in Java before you had to
> understand class loaders...?
>
> --tom
>
> "Shkuro, Yuri" wrote:
> >
> > I am not aware of any mechanisms in Java to inspect a class and determine
> > its dependencies (although javac obviously has to do it, but its
> > proprietory).
> > I think this issue is too difficult for any container to handle
> > automatically.
> >
> > -Original Message-
> > From: gustav spellauge [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 14, 2001 3:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: must restart tomcat
> >
> > thanks,
> >
> > that's what i thught but now i can be quit shure.
> >
> > do you think/know if tmcat 4.x will support hotswapping of all dependencies
> > ?
> >
> > g.
> >
> > "Shkuro, Yuri" wrote:
> >
> > > Tomcat 3.2 only supports hot-swapping of servlet classes, but not their
> > > dependencies like bean classes, so you either have to restart Tomcat, or
> > > use its admin interface to remove your application context and add it
> > again.
> > >
> > > Note that the latter is not necessarily faster (usually takes me four hits
> > > on the URL: list/delete/add/list), unless you have many applications in
> > your
> > > webapp directory (and you shouldn't if you plan to restart often).  Also,
> > > I noticed that when a context is added via admin interface, Tomcat does
> > > not set init parameters for this context, which my application depends on.
> > >
> > > YS.
> > >
> > > -Original Message-
> > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 14, 2001 2:47 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: must restart tomcat
> > >
> > > I think, you need to config your server.xml file to tell to "reload" your
> > > classes after they are changed / rebuilt.
> > > Do you config server.xml for your new application?
> > >
> > > gustav spellauge wrote:
> > >
> > > > again my qustion:
> > > >
> > > > after a change in any of a formbean class or an action class i will have
> > > > to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
> > > >
> > > > is there any way to avoid this restart. maybe something is wrong with my
> > > > setup.
> > > >
> > > > thanks in advance
> > > >
> > > > g.




Re: Question on ActionServlet design

2001-02-14 Thread Mueller, Franz

Hi Craig,


Our web-app looks like:

ActionServletMain
  
   ActionServletModule1ActionServletModule2  ...
   

All of the controllers are living in the same web-app.
The main controller is the only instance which knows about all the
module-controllers. 
The communication between a module controller and the main controller is
minimal.
Each of the controllers has its own set of JSP/HTML-pages which are located
in its own subfolders.
The file structure looks like: %web-app%\
'main' ui

module1\ 
 'module1' ui
module2\
 'module2' ui
... 

The reasons for the modularisation are:
1. each module can exist in its own web-app 
2. each module is developed by a different group

Each module has ist own extension-mapping. So the requests with the
extension *.main are served by the ActionServletMain, and *.m1  by the
ActionServletModule1 and so on.



You mentioned:
Craig::>>servlet context attributes set up by the ActionServlet instances
that started first to 
Craig::>>be wiped out by the attributes created
Craig::>>in the ActionServlet instance that started last ...

Since we are using Struts just as a controller framework and are NOT using
any Struts tags, 
are we on the safe side ?
What are the smoking guns in such a model ?

The attributes, that the ActionServlet is setting in the application and in
the session scope (like Locale ) are 
they required for the controller part of Struts or for  the Struts-tags ?


Best Regards, fm




Setting focus to a text field

2001-02-14 Thread David J Snowsill



Hi All,
 
Does anybody know how to set the focus for a text 
field on a form?
 
Thanks
 
David J SnowsillPrincipal ConsultantCalibre 
Financial Technology[EMAIL PROTECTED]Office: 
(61-2) 9212 0527Mobile: 0403 091 468
 
***This 
E-mail is intended only for the use of the individual or entity namedabove 
and may contain information that is confidential and privileged. If you 
are not the intended recipient, you are hereby notified that 
anydissemination, distribution or copying of this E-mail is strictly 
prohibited. If you have received this E-mail in error, please notify us 
immediatelyby return e-mail to the sender or by telephoning one of our staff 
on (61-2)9212 0527.  Please then destroy any copies of the original 
message thatare in your possession. Thank 
you.***

BEGIN:VCARD
VERSION:2.1
N:Snowsill;David;J;Mr
FN:David J Snowsill
ORG:Calibre Financial Technology
TITLE:Principal Consultant
TEL;WORK;VOICE:02 9212 0527
TEL;CELL;VOICE:0403091468
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Suite 487=0D=0A311 Castlereigh Street;Sydney;NSW;2000;Australia
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Suite 487=0D=0A311 Castlereigh Street=0D=0ASydney, NSW 2000=0D=0AAustralia
URL:
URL:http://www.calibreFT.com.au
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010215T061847Z
END:VCARD



Re: Old questions that die hard

2001-02-14 Thread David Winterfeldt

I added basic client side javascript validation that
matches the server side validation.  Validation rules
are stored in an xml file.  

I thought that if the form had a locale attribute that
would take care of i18n or there could be separate
files like the property resource files.

I was also thinking about how open the validation
framework should be.  If it could be configured a
little like some Ant tasks, you could define a method
to perform validation and what validation need to
finish before others proceed like the Ant depends
attribute.
   

   



I thought of this because I'm checking for all
required fields before continuing to check the regular
expressions.  Anyway, it's late.  I hope that part
made sense.

I posted the code and a example war at.  Ted, if you
want to, you can add this to the list of struts
sites/resources you have.  Is this something along the
lines you were thinking of?  Let me know what you
think of Ted.
http://home.earthlink.net/~dwinterfeldt

David Winterfeldt

--- Ted Husted <[EMAIL PROTECTED]> wrote:
> My initial thoughts were to look at what some of the
> advanced HTML
> authoring tools, like FrontPage and Dreamweaver do
> with this. Craig
> mentioned to me that the client-side validations
> should be coordinated
> with any new work on server-side validations. 
> 
> Obviously, some standard "domain type" validations
> would be very useful,
> corresponding to Java or SQL types. These might be
> the sorts of things
> we could easily add as properties, and would fit in
> with any IDE
> integration projects.
> 
> These could then be braced server-side with hardcore
> regex validations,
> along with any business logic checking.
> 
> Of course, late-model Javascript also supports regex
> ...
> 
> Jim Richards wrote:
> >>The other thing I haven't found reference to yet
> is
> >>client side validation (but I also haven't looked
> that hard either)
> 
> > I did notice that you had your name down for the
> client
> > side validation. I'd be interested in your
> thoughts, and
> > ideas because this is something I've done a lot of
> > recently (not in Struts/JSP though) ...
> 
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/about/struts/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: ActionForm property naming conventions

2001-02-14 Thread Martin Cooper

The Introspector.decapitalize() method does indeed have a special case for
where the second letter is capitalized. Here's the offending piece of code
from that method:

 if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
   Character.isUpperCase(name.charAt(0))){
 return name;
 }

So given a method named "getNTerminal", the Introspector will derive a
property name of "NTerminal".

Hope this helps.

--
Martin Cooper
Tumbleweed Communications


- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 12:53 PM
Subject: Re: ActionForm property naming conventions


> [EMAIL PROTECTED] wrote:
>
> > My question is best asked with an example... Why is it that I am unable
to
> > create a property named "nTerminal" for my ActionForm/JSP? This problem
> > occurs when there is an uppercase letter in the 2nd position of the
property
> > name. If I change the name to "nterminal" or "ntErminal" then things
work
> > just fine. In other words- getNterminal() is recognized by Struts, but
> > getNTerminal() is invalid and results in a runtime error in the html
tag. Is
> > this a limitation imposed by Javabean conventions or is this a Struts
> > specific issue? (If you think I am crazy, then perhaps this problem is
> > specific to WebLogic.)
> >
> > Thanks,
> > Bob
>
> Struts uses the introspection capabilities Java Reflection APIs -- in
> particular, it calls java.beans.Introspector.getBeanInfo() -- to figure
out the
> names of the getter and setter methods for various properties.  The
> introspector, in turn, enforces the design patterns that are documented in
the
> JavaBeans specification.  It is possible that there are some special cases
for
> the second letter of a property name being capitalized.
>
> I would have expected "getNTerminal" and "setNTerminal" to work for a
property
> named "nTerminal".
>
> Craig
>
>





RE: Newbie question

2001-02-14 Thread Simon Sadedin

Drew,

> I have the struts.jar on the CLASSPATH.

It may be this that is screwing you up.  You have to relearn some things
about classpaths when you start working with j2ee style servlet
containers.  Make sure the struts jar(s) are not in tomcat's lib
directory or your classpath. It should be sufficient to have them in the
WEB-INF/lib directory.

Cheers,

Simon.

-Original Message-
From: Drew Nichols [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 9:22 PM
To: struts
Subject: Newbie question


Hi there,

I have downloaded and installed the struts wars into tomcat/webapps.
When I restart tomcat I get the following error msg:

New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User

When I load the struts-example I get this error:

javax.servlet.ServletException: Missing resources attribute
org.apache.struts.action.MESSAGE

I have the struts.jar on the CLASSPATH.
Have I missed something in the config??
I have followed the instructions carefully.

TIA

Drew




Re: ActionForm property naming conventions

2001-02-14 Thread Dzenan Ridjanovic

I have another problem example that I had reported earlier.  I had to change the
property name from eMail to email to get it through.

"Craig R. McClanahan" wrote:

> [EMAIL PROTECTED] wrote:
>
> > My question is best asked with an example... Why is it that I am unable to
> > create a property named "nTerminal" for my ActionForm/JSP? This problem
> > occurs when there is an uppercase letter in the 2nd position of the property
> > name. If I change the name to "nterminal" or "ntErminal" then things work
> > just fine. In other words- getNterminal() is recognized by Struts, but
> > getNTerminal() is invalid and results in a runtime error in the html tag. Is
> > this a limitation imposed by Javabean conventions or is this a Struts
> > specific issue? (If you think I am crazy, then perhaps this problem is
> > specific to WebLogic.)
> >
> > Thanks,
> > Bob
>
> Struts uses the introspection capabilities Java Reflection APIs -- in
> particular, it calls java.beans.Introspector.getBeanInfo() -- to figure out the
> names of the getter and setter methods for various properties.  The
> introspector, in turn, enforces the design patterns that are documented in the
> JavaBeans specification.  It is possible that there are some special cases for
> the second letter of a property name being capitalized.
>
> I would have expected "getNTerminal" and "setNTerminal" to work for a property
> named "nTerminal".
>
> Craig




Re: controlling the next page to be displayed

2001-02-14 Thread Craig R. McClanahan

Silvia Yeh wrote:

> What happens to me now is that after "return (new ActionForward(path))",
> where path is the caller/previous url with new content( ig, delete a record
> in an array ), I need to refresh the content!
>

If you have a separate action that refreshes the content and then forwards to
the display page, this can be done quite simply -- just do a forward to the
action, instead of directly to the page.

The Struts example application does this.  Consider what happens when you add,
edit, or delete a subscription (on the subscription.jsp) page, which submits to
"/saveSubscription.do".  In order to redisplay the updated current list of
subscriptions, the following events takes place:

* The /saveSubscription action completes the appropriate
  changes on the database

* The /saveSubscription action forwards to its "success"
  ActionForward, which points at "/editRegistration.do?action=Edit

* The /editRegistration action sets up the correct beans for the
  "registration.jsp" page to be redisplayed

* The /editRegistration action forwards to its "success"
  ActionForward, which points at "/registration.jsp"

* The JSP page containaing the registration information, and
  the current list of subscriptions for the logged in user, is displayed

The visual effect of this is that the information on the subscription list is
always kept up to date.

>
> Any suggestions? Thanks in advance..
>
> Regards,
>
> Silvia Yeh
>

Craig McClanahan





Newbie question

2001-02-14 Thread Drew Nichols

Hi there,

I have downloaded and installed the struts wars into tomcat/webapps.
When I restart tomcat I get the following error msg:

New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User

When I load the struts-example I get this error:

javax.servlet.ServletException: Missing resources attribute
org.apache.struts.action.MESSAGE

I have the struts.jar on the CLASSPATH.
Have I missed something in the config??
I have followed the instructions carefully.

TIA

Drew




netscape 4.7x, session ids and struts

2001-02-14 Thread Gordon Maclean



Using netscape 4.7x on either solaris, linux or windows, the
struts-example fails, because I am bounced between two different
sessions.

The symptom indicates to me that netscape keeps separate lists
of cookies for the following URLs:

http://myhost
http://myhost:80

As one goes through the struts example, the URL is
sometimes displayed as myhost, and sometimes as myhost:80,
and I am never allowed past the login because the user
information is kept in a session associated with myhost,
and can't be found in a session associated with myhost:80.

Environment: struts nightly download as of Feb 12, 2001.
Tomcat 3.2.1, mod_jk, apache 1.3.12 on RH7.

I have all cookies enabled in netscape preferences, with
"Warn before accepting a cookie" also turned on for debugging.

1. When I try the struts-example with the following URL:

http://myhost/struts-example

Netscape asks if I want to send the cookie JSESSIONID=f78s0eymd1,
and I click OK.

2. I select the "Log on ..." link.  Then the logon form is displayed at
a
   URL of
http://myhost:80/struts-example/logon.jsp;jsessionid=f78s0eymd1

Note the cookie in the URL because struts doesn't yet know if my browser 
accepts cookies.  Also note the port number 80 in the URL.

3. I enter user:pass and Submit.  

LogonAction logs the following message:

2001-02-15 01:59:47 - path="/struts-example" :action: LogonAction: 
User 'user' logged on in session f78s0eymd1


The mainMenu.jsp page is displayed, with a URL: 

http://myhost/struts-example/logon.do;jsessionid=f78s0eymd1

(note no port number is in the URL)

4. Then, when I select "Edit your" the netscape question box pops up
asking if I want to send a cookie JSESSIONID=ynsmafyqr1.
The URL is shown as
http://myhost:80/struts-example/editRegistration.do?action=Edit
 
This shouldn't happen, it should use the first session id!

5. When I click on OK, then, EditRegistrationAction logs the following
error:

2001-02-15 02:00:55 - path="/struts-example" :action:  User is not
  logged on in session ynsmafyqr1


The logon.jsp form is again displayed.  If I enter user:pass, then
LogonAction reports a successfull login in session f78s0eymd1
(the first session id again!)

When I select "Edit ..." I get the same error from
EditRegistrationAction about "User is not logged on in session
ynsmafyqr1".
And so on, ad-infinitum.

If I disable cookies in netscape preferences, then things
work with URL rewriting, and EditRegistrationAction forwards me to
registration.jsp.

The problem also does not show up with IE 5.

Also, at step 4, if I manually enter a URL of:
http://myhost/struts-example/editRegistration.do?action=Edit
then EditRegistrationAction succeeds and forwards to registration.jsp. 


If I am right about netscape keeping separate cookie lists, then perhaps
a workaround is for struts (specifically the html taglib) not to add
the port number when generating URLs?

I haven't tested this solution.  

Someone must have run into it also?

Gordon Maclean

-- 
*
Gordon Maclean, Software Engineer, 303 497-8794
Nat'l Center for Atmospheric Research, Boulder CO USA
*



RE: controlling the next page to be displayed

2001-02-14 Thread Silvia Yeh

What happens to me now is that after "return (new ActionForward(path))",
where path is the caller/previous url with new content( ig, delete a record
in an array ), I need to refresh the content!

Any suggestions? Thanks in advance..



Regards,

Silvia Yeh


-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 8:59 AM
To: [EMAIL PROTECTED]
Subject: Re: controlling the next page to be displayed


Craig M. answered this question yesterday in a mail titled: "Proper way to
'forward' dynamically"


When I need this, I just create a new ActionForward dynamically:

String path = ... create context-relative path to new page ...
return (new ActionForward(path));

The path you calculate must be context relative and start with a slash,
exactly
like the "path" attributes to your standard  elements.


Ratnadeep Bhattacharjee wrote:

> Hi,
>
> I am quite new to Struts and was wondering if someone could help me with
the
> following issue:
>
> I am on a web page and I have entered some data and I click on Submit.
Now, the
> Action class correspoding to its JSP page gets executed. I would like the
> perform() method of the Action class to determine the next page that
should be
> displayed (based on data I had entered).
>
> If I use
> return (mapping.findForward("success"))
>
> I can go to one page only - the one that is mentioned in my
struts-config.xml.
>
> 
>
> I would like to go to one of many pages on success.
>
> Thanks,
> -Deep.

--
I've been trying to change the world for years, but they just won't give me
the
source code




Re: Question on ActionServlet design

2001-02-14 Thread Craig R. McClanahan

Kishore Subramanian wrote:

> Hi,
>
> What are the reasons to have only one instance of the ActionServlet (controller 
>servlet) ?
>

To clarify slightly, there is one instance of the controller servlet per web 
application.

The reasoning is that some resources are truly application wide, and there is zero 
benefit in duplicating them.  For example,
because servlets run in a multithreaded environment, having more instances of them 
would not make it run any faster.

Also, a single controller servlet gives you a central point of control where you can 
guarantee that functions you want
performed happen on every single request.

>
> Can I subclass from ActionServlet and have one servlet for each module in my web 
>application ?

You could if you want, but you're going to run into problems unless you run each 
module in an independent web app.  If you do
that, there is no particular need to subclass ActionServlet either, unless you need 
some specialized functionality that is not
already provided.

If you run your modules in separate webapps, then each webapp is pretty much 
autonomous -- servlet context attributes,
sessions, and even static variables in Java classes do not cross the boundary between 
webapps.

> What are the implications ?
>

Trying to run mutliple instances of ActionServlet in the same web application (whether 
subclassed or not) would cause the
servlet context attributes set up by the ActionServlet instances that started first to 
be wiped out by the attributes created
in the ActionServlet instance that started last.  This would be a Bad Thing (tm) :-)

>
> Thanks,
>
> Kishore Subramanian
> Agile Software
> Off : 408 999 7128
> http://www.agilesoft.com

Craig McClanahan





Question on ActionServlet design

2001-02-14 Thread Kishore Subramanian


Hi,

What are the reasons to have only one instance of the ActionServlet (controller 
servlet) ? 

Can I subclass from ActionServlet and have one servlet for each module in my web 
application ? What are the implications ?

Thanks,

Kishore Subramanian
Agile Software
Off : 408 999 7128
http://www.agilesoft.com




Re: Forwarding an action to multiple JSPs

2001-02-14 Thread Rob Leland

You can probably get javascript to update the parent
frame. I did this in a previous project but now avoid
frames, even if the speed up page reloads.



Shad wrote:
> 
> Is there a way to forward a request to more than on
> JSP from the same action class, and have the JSPs
> updated different frames?
> 
> Scenerio:
> When a user logs into the system and the login request
> gets forwarded to the "LoginAction" class, I would
> like to forward this request to two JSPs: 1.) To
> perform the normal authentication routine and display
> the resulting success/failure message to a particular
> frame, and 2.) to get a list of the users currently
> logged into the system and display it in a separate
> frame.
> 
> Any help/pointers would be greatly appreciated.
> 
> Shad.
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/



Re: Please, help with strange exception

2001-02-14 Thread Rob Leland

 
   ^

Also make sure you are not mixing 0.5 Tags and 1.0 Tags
The old tag librariy is 
  struts.tld 
the new ones are
   struts-html.tld
   struts-logic.tld
   etc ...



[Fwd: Re: Avoid JSP caching by the browser]

2001-02-14 Thread Rob Leland


Use the Action.saveToken(), Action.resetToken(),
Action.isTokenValid()  for
form transactions. This does exactly what you want.

see

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


for the thread that discusses this.



Lind Jürgen wrote:
> 
> Hi there,
> 
> I have the following problem: in order to prevent the web-browser
> from using cached versions of a jsp, we plan to add some unique
> timestamp (which will actually be ignored by the jsp) to the url
> that calls the jsp, e.g.:
> 
> myjsp
> 
> While this works fine when cookies are enabled, it fails when
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
> 
> Using the html:link tag, however, introduces the difficulty how to
> dynamically add the timestamp. Using something like
> 
> myjsp
> 
> fails as the Java Code will not get interpreted but it will be literally
> appended  to the URL, causing a Decode Error in the receiving JSP.
> 
> Has anyone experienced similar problems (with the web browser caching
> jsp pages) and could offer some help or are there any suggestions wrt.
> the above evaluation problem?
> 
> Regards
> 
> Jürgen
> 
> --
> Dr. Jürgen Lind
> iteratec GmbHFon: +49 (0)89 614551-44
> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> 82008 Unterhaching   Web: www.iteratec.de



Re: setting docBase in JBuilder to run/debug

2001-02-14 Thread Rob Leland

One Resource for this is the mail archives.

http://www.mail-archive.com/struts-user%40jakarta.apache.org/maillist.html

Use the keywords 'jbuilder context'

This will bring up an answer to your question, last answer.


[EMAIL PROTECTED] wrote:
> 
> Hello,
> 
> it's only slightly related to STruts, but I like to get your suggestions to the
> following problem:
> 
> I use JBuilder 4 Enterprise Trial with Tomcat 3.2 and Struts. If I want to run
> the application,
> the Tomcat docBase is always set to D:\ instead of D:\TOMCAT.
> 
> I provided the correct path to the JVM via the -D.. parameter.
> The project properties are set correctly
> 
> Here's the related output from JBuilder:
> 
> 
>
> 
> Setting home to D:\
> Starting tomcat. Check logs/tomcat.log for error messages
> 
> Context log: path="" Adding context path=""  docBase="D:\"
> Context log: path="/vip-gallery" Adding context path="/vip-gallery"
> docBase="D:\"
> Starting tomcat install="d:\tomcat\" home="D:\"
> 
>classPath="C:\Programme\JBuilder4\tomcat\lib\webserver.jar;C:\Programme\JBuilder4\tomcat\lib\jasper.jar;C:\Programme\JBuilder4\tomcat\lib\xml.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\Oracle\JDeveloper
> 
> 
>3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\webserverglue.jar;D:\tomcat\webapps\vip-gallery\WEB-INF\classes;C:\Programme\Oracle\JDeveloper
> 
> 
>3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\JBuilder4\lib\jbuilder.jar;C:\Programme\JBuilder4\lib\help.jar;C:\Programme\JBuilder4\lib\gnuregexp.jar;C:\Programme\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\Programme\JBuilder4\jdk1.3\lib\dt.jar;C:\Programme\JBuilder4\jdk1.3\lib\tools.jar;C:\Programme\Oracle\JDeveloper
> 
> 3.2\java1.2;
> C:\Programme\Oracle\JDeveloper 3.2\java1.2\jre;C:\Programme\Oracle\JDeveloper
> 3.2\java1.2\lib"
> JSP Servlet Started
> ...
> 
> 
>
> 
> Do you have a suggestion how to set the docBase correctly?
> 
> Regards
> 
> Michael



Struts and Turbine

2001-02-14 Thread dion

I personally don't use anything from Turbine, because it's design seems to
predicate certain skills and page concepts that don't necessarily occur in
my projects.

As for reusing code within Turbine, the major factor stopping me from doing
that is lack of knowledge and accessibility. Having 'reusable' code stuck
inside a project like Struts or Turbine limits its reusability. There's
been lots of discussion on the general list about this recently.

"user access control module?"
I'd guess most struts users would have no idea that Turbine had one.
Turbine's home page and features page don't mention "user access", but do
mention ACLs and roles. The Velocity/WebMacro focus and deemphasis of JSP
throughout Turbine made the impression on me that I'd be using technology
that duplicate existing JSP/Struts concepts and make the project more
complex.
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf





Re: Struts and Turbine

2001-02-14 Thread Ted Husted

Jonathan Carlson wrote:
> Are there a lot of Struts users using major Turbine components like the user
> access control module?  If so, is it 2% 50% or 90%?  In other words, how
> compatible are they really?  I checked the archives but didn't see much that
> answered this question.
> 
> What I'm really getting at is that I don't see much on either the Struts web
> site or the Turbine site that refers to each other.  Considering they are
> both Apache projects, the perceived silence about each other makes me kind
> of nervous.

Since technologies on many of the Jakarta products are starting to
overlap, we are discussing a component sharing library on the General
list. This would make it much easier for Jakarta products (as well as
others) to share individual components. Right now, a lot of the pieces
of an individual product depend on several other pieces, which makes it
difficult to take the banana without getting the whole gorilla. If you
have an interest in this sort of thing, see 
< http://husted.com/about/jakarta/library.html >

Turbine is very results-orientated, and is a good choice for advanced
developers looking for a high-performance, omnibus solution. 

Struts is very standards-orientated, and is a good choice for enterprise
developers looking for something that will fit well with their own big
picture. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 425-0252; Fax 716 223-2506.
-- http://www.husted.com/about/struts/



Struts and Turbine

2001-02-14 Thread Jonathan Carlson

I am new to Struts and Turbine and am trying to get a feel for their
compatibility from the Struts perspective.  The Turbine site says that it
can be used with JSP, which I take to include Struts.  However, it *seems*
that Turbine developers prefer the templating systems over Struts (maybe I'm
wrong about that).  Does that mean that Turbine has a lot of template
assumptions in it which would make its major components hard to use with
Struts?  I understand the push-MVC vs pull-MVC philosophical differences
between the template systems and Struts.

Are there a lot of Struts users using major Turbine components like the user
access control module?  If so, is it 2% 50% or 90%?  In other words, how
compatible are they really?  I checked the archives but didn't see much that
answered this question.

What I'm really getting at is that I don't see much on either the Struts web
site or the Turbine site that refers to each other.  Considering they are
both Apache projects, the perceived silence about each other makes me kind
of nervous.

Hopefully I haven't asked too many questions in one e-mail :-)

Jonathan Carlson
Software Developer
[EMAIL PROTECTED]



Struts and Turbine

2001-02-14 Thread Jonathan Carlson

I am new to Struts and Turbine and am trying to get a feel for their
compatibility from the Struts perspective.  The Turbine site says that it
can be integrated with JSP, which I infer to include Struts.  However, it
*seems* that Turbine developers prefer the templating systems over Struts
(maybe I'm wrong about that).  Does that mean that Turbine makes a lot of
template assumptions which would make it hard to use with Struts?  I
understand the push-MVC vs pull-MVC philosophical differences between the
template systems and Struts.

Are there a lot of Struts users using major Turbine components like the user
access control module?  If so, is it 2% 50% or 90%?  In other words, how
compatible are they really?  I checked the archives but didn't see much that
answered this question.

What I'm really getting at is that I don't see much on either the Struts web
site or the Turbine site that refers to each other.  Considering they are
both Apache projects, the perceived silence about each other makes me kind
of nervous.

Hopefully I haven't asked too many questions in one e-mail :-)

Jonathan Carlson
Software Developer
[EMAIL PROTECTED]



Re: Avoid JSP caching by the browser

2001-02-14 Thread Rob Leland

Use the Action.saveToken(), Action.resetToken(),
Action.isTokenValid()  for
form transactions. This does exactly what you want.

see

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


for the thread that discusses this.



Lind Jürgen wrote:
> 
> Hi there,
> 
> I have the following problem: in order to prevent the web-browser
> from using cached versions of a jsp, we plan to add some unique
> timestamp (which will actually be ignored by the jsp) to the url
> that calls the jsp, e.g.:
> 
> myjsp
> 
> While this works fine when cookies are enabled, it fails when
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
> 
> Using the html:link tag, however, introduces the difficulty how to
> dynamically add the timestamp. Using something like
> 
> myjsp
> 
> fails as the Java Code will not get interpreted but it will be literally
> appended  to the URL, causing a Decode Error in the receiving JSP.
> 
> Has anyone experienced similar problems (with the web browser caching
> jsp pages) and could offer some help or are there any suggestions wrt.
> the above evaluation problem?
> 
> Regards
> 
> Jürgen
> 
> --
> Dr. Jürgen Lind
> iteratec GmbHFon: +49 (0)89 614551-44
> Inselkammerstrasse 4 Fax: +49 (0)89 614551-10
> 82008 Unterhaching   Web: www.iteratec.de



Re: A couple more frames (and non-frames) questions

2001-02-14 Thread Craig R. McClanahan

James Howe wrote:

> I'm sort of confused as to where the system thinks it is after
> performing a forward action.

This is one of the interesting wrinkles to using a RequestDispatcher (as Struts
does to implement the forwarding).  Because the client browser has no clue that
the forwarding took place, so by default relative URLs will be resolved based
on the URL of the action you submitted to (i.e.  something like
http://localhost:8080/myapp/action.do) rather than where the JSP page itself
is.

One approach that works, as you pointed out, was putting everything at the top
level of the URL hierarchy within your webapp.  Another option is to include
the



tag in the  section of your page.  This will generate a 
element in the generated page, which will make relative addresses resolve
against the URL of the JSP page itself, not the action that forwarded to it.

Craig





RE: Avoid JSP caching by the browser

2001-02-14 Thread Shukla, Vinay

Why are we not using html meta tag expires



am i missing something.?

Vinay Shukla

HPBluestone




-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 3:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Avoid JSP caching by the browser


Lind Jürgen wrote:

> Hi there,
>
> I have the following problem: in order to prevent the web-browser
> from using cached versions of a jsp, we plan to add some unique
> timestamp (which will actually be ignored by the jsp) to the url
> that calls the jsp, e.g.:
>
> myjsp
>
> While this works fine when cookies are enabled, it fails when
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
>
> Using the html:link tag, however, introduces the difficulty how to
> dynamically add the timestamp. Using something like
>
> myjsp
>

This fails because you cannot intermix constant text and runtime expressions
in a single attribute -- it has to be one or the other:

myjsp

Note the use of single quotes around the entire expression so that the
parser doesn't get confused by the double quotes around Java strings.

>
> fails as the Java Code will not get interpreted but it will be literally
> appended  to the URL, causing a Decode Error in the receiving JSP.
>
> Has anyone experienced similar problems (with the web browser caching
> jsp pages) and could offer some help or are there any suggestions wrt.
> the above evaluation problem?
>

>
> Regards
>
> Jürgen
>

Craig McClanahan




Re: must restart tomcat

2001-02-14 Thread Tom Janofsky



Just FYI - it's not that hard.

toolkits to get this info
 http://www.inf.fu-berlin.de/~dahm/JavaClass/ (lgpl'd byte code tools)
or
 CFParse from IBM alphaworks 
 (both can be used the get all the classes used by a class)

some tools that do this sort of thing...
 http://vorlon.eecs.cwru.edu/~jrl7/java/ImportMin.txt (tells you what
you need to import)
 Dash-o also does something like this to clean up imports, and
woodenchair's Utility+

Although I'd bet my $.02 that all tomcat 4.x does is watch timestamps on
all the files under classes.

And slightly OT - wasn't life nice and simple in Java before you had to
understand class loaders...?

--tom

"Shkuro, Yuri" wrote:
> 
> I am not aware of any mechanisms in Java to inspect a class and determine
> its dependencies (although javac obviously has to do it, but its
> proprietory).
> I think this issue is too difficult for any container to handle
> automatically.
> 
> -Original Message-
> From: gustav spellauge [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 3:21 PM
> To: [EMAIL PROTECTED]
> Subject: Re: must restart tomcat
> 
> thanks,
> 
> that's what i thught but now i can be quit shure.
> 
> do you think/know if tmcat 4.x will support hotswapping of all dependencies
> ?
> 
> g.
> 
> "Shkuro, Yuri" wrote:
> 
> > Tomcat 3.2 only supports hot-swapping of servlet classes, but not their
> > dependencies like bean classes, so you either have to restart Tomcat, or
> > use its admin interface to remove your application context and add it
> again.
> >
> > Note that the latter is not necessarily faster (usually takes me four hits
> > on the URL: list/delete/add/list), unless you have many applications in
> your
> > webapp directory (and you shouldn't if you plan to restart often).  Also,
> > I noticed that when a context is added via admin interface, Tomcat does
> > not set init parameters for this context, which my application depends on.
> >
> > YS.
> >
> > -Original Message-
> > From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 14, 2001 2:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: must restart tomcat
> >
> > I think, you need to config your server.xml file to tell to "reload" your
> > classes after they are changed / rebuilt.
> > Do you config server.xml for your new application?
> >
> > gustav spellauge wrote:
> >
> > > again my qustion:
> > >
> > > after a change in any of a formbean class or an action class i will have
> > > to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
> > >
> > > is there any way to avoid this restart. maybe something is wrong with my
> > > setup.
> > >
> > > thanks in advance
> > >
> > > g.



RE: html:password

2001-02-14 Thread Scott Ganyo

I agree.  There are at least a couple of reasons for doing it this way:

1) If the user has not logged out, a hacker could decide to change the
user's password without knowing the old password.  Thus, the user is now
locked out and unable to regain access to the system.

2) Perhaps even worse, a hacker could access the password change screen and
see the existing password without the user knowing their password has now
been compromised.

Scott

> -Original Message-
> From: Shkuro, Yuri [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 3:43 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: html:password
> 
> 
> I can't recall an application where a user would be prompted to edit
> a password.  It's always
> 
> old password:
> new password:
> veify new password:
> 
> The only case where returning the password could make sence 
> is when the
> password field is on a very long form, where the user can 
> make a mistake 
> and has to return to this form - in this case it is quite 
> annoying retyping
> the password over and over.  However, smart sites bypass this 
> and do not
> show the password field after the first submission or show 
> but don't require
> entering it, even if the user is returned to the form on an 
> error (e.g., one
> can
> encrypt it and store in a hidden field, and put some junk 
> like 1234567 into
> the password field to indicate that "something" was enterred 
> and doesn't
> have
> to be retyped).
> 
> YS
> 
> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> 
> For login dialogs, it makes sense that you do not want the 
> password echoed
> (even
> if it shows asterisks).  But what about the case of when you 
> are editing an
> existing password (as the Struts example application does)?  
> The behavior of
> not
> echoing actually broke this code.
> 
> Craig McClanahan
> 



RE: ActionForm property naming conventions

2001-02-14 Thread rhayden


Hi Craig,

Yes I expected this to work as well, since the first letter is not
capitalized. Craig (T) provided some info from the spec, but this should
only apply if both the first and second letter are caps.  Not a big deal
really (just changed my property names), but something to be aware of...

Thanks,
Bob


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 3:53 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionForm property naming conventions


[EMAIL PROTECTED] wrote:

> My question is best asked with an example... Why is it that I am unable to
> create a property named "nTerminal" for my ActionForm/JSP? This problem
> occurs when there is an uppercase letter in the 2nd position of the
property
> name. If I change the name to "nterminal" or "ntErminal" then things work
> just fine. In other words- getNterminal() is recognized by Struts, but
> getNTerminal() is invalid and results in a runtime error in the html tag.
Is
> this a limitation imposed by Javabean conventions or is this a Struts
> specific issue? (If you think I am crazy, then perhaps this problem is
> specific to WebLogic.)
>
> Thanks,
> Bob

Struts uses the introspection capabilities Java Reflection APIs -- in
particular, it calls java.beans.Introspector.getBeanInfo() -- to figure out
the
names of the getter and setter methods for various properties.  The
introspector, in turn, enforces the design patterns that are documented in
the
JavaBeans specification.  It is possible that there are some special cases
for
the second letter of a property name being capitalized.

I would have expected "getNTerminal" and "setNTerminal" to work for a
property
named "nTerminal".

Craig




A couple more frames (and non-frames) questions

2001-02-14 Thread James Howe

I have a couple more questions regarding Struts and frames as well as a 
question concerning web site organization.

I was able to get my frames-based Struts application to sort of work after 
adding the "target" property to my logon form.  This leads to my next 
question.  My current page has the Navigation frame, the body frame and the 
footer frame.  I had made my footer a jsp which was design to display 
information based on who the user logged in as.  Before the user logs in, 
the foot is basically blank.  I present the logon screen.  Once the user 
logs on, I want to display a new page in the body frame, but I also want 
the footer to update.  Unfortunately, it appears that when the logon form 
finishes transferring to the "success" page, only the body frame 
updates.  (Not that this should be too surprising).  My question is, how 
can I get the footer frame to update as well?  Can I programatically get 
other frames to update when an action occurs?  Or do I just need to 
restructure how my page works?

Related to the above, the current structure of my web application has some 
pages at the root level and some in subdirectories.  For example, my 
logon.jsp is in the root, but the jsp and html associated with the success 
action exists in a subdirectory.  When I logged into my application, I was 
able to most of the contents of my next page to display, but not 
everything.  I also had to tweak some of the paths in my html.  For 
example, previously I had a reference to a style sheet as 
"../style.css".  When the page was displayed, the style was not 
applied.  If I changed the reference to "style.css", the style was 
correctly applied.However, my page also referenced an html file for one 
of its frames.  This page never appeared, and no error was displayed 
either.  I'm sort of confused as to where the system thinks it is after 
performing a forward action.  I'm sure I could get everything to work if I 
just put it all in the root directory, but I'm not sure that's what I want 
to do.  Can anyone offer any suggestions on good ways to organize Struts 
applications?

Thanks again.




Re: must restart tomcat

2001-02-14 Thread Craig R. McClanahan

"Shkuro, Yuri" wrote:

> I am not aware of any mechanisms in Java to inspect a class and determine
> its dependencies (although javac obviously has to do it, but its
> proprietory).

In Tomcat, it only works in the restricted case where the class is loaded from
an individual disk file under WEB-INF/classes.  Tomcat includes a custom
classloader for the webapp which remembers the date/time stamp of the class file
when each class was loaded, and then periodically checks the directory for files
that have timestamps later than that.

>
> I think this issue is too difficult for any container to handle
> automatically.
>

It's definitely a pain to implement -- be glad the containers do it for you :-)

Craig





Re: must restart tomcat

2001-02-14 Thread Craig R. McClanahan

gustav spellauge wrote:

> thanks,
>
> that's what i thught but now i can be quit shure.
>
> do you think/know if tmcat 4.x will support hotswapping of all dependencies ?
>

Tomcat 4.0 supports autoreload when any class (not just a servlet) is updated, as
long as that class is unpacked in WEB-INF/classes.  There is a background thread
that checks for updates, by default every 15 seconds.

Instead of the admin application of 3.2, there is also a manager application in
4.0 that can trigger a reload with a single request:

http://localhost:8080/manager/reload?path=/myapp

where "/myapp" is the context path of the application you want to reload.  This
works even if "autoreload" is not set on the app in server.xml, so you might find
it faster to trigger reloads this way.  The only thing needed to make it work is
to create a user in conf/tomcat-users.xml that has the role "manager" -- you will
be challenged the first time you reload for the username/password, but after that
you will just need to submit.

When I'm developing an app on Tomcat 4.0, I just leave a small browser window open
on the URL mentioned above.  Whenever I want to reload the app, I just click the
Reload button in this window.  Very quick and easy.

>
> g.
>

Craig





RE: html:password

2001-02-14 Thread rhayden

Joerg,

I disagree with your first argument- This option should be left up to the
developer to decide. Significant "ramifications" should be described in the
documentation, and I think are already understood by most web programmers.
If I want to compromise my site security then I should be able to do so. 

Bob


-Original Message-
From: Joerg Beekmann [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:19 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: html:password


I argued not to echo the password when this first came up. I still feel that
way and also feel there should not be a boolean allowing the password to be
echoed back. Not everyone who sets the boolean to echo will understand the
ramifications. 

I also don't believe we would be doing the user a service by echoing the
password back, in fact quite the opposite. Think about it; presumably the
password is displayed in the form  and is echoed back the same way. The
use doesn't know which characters are incorrect so will need to select the
entire password and retype it. It is simpler for them if the field is blank
and has focus in which case they just type the password again and enter. In
my experience that is the way logon dialogs work.

Joerg


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Matthias Bauer
> Sent: February 14, 2001 12:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: html:password
> 
> 
> As I asked the original question on the new behaviour for the 
> password field,
> let me say this: I did not see the problem when I asked my 
> question, but now I
> am perfectly aware (and I admit, it is quite obvious) of the 
> security risk you
> are imposing when you send the current value of the password 
> along in the html
> source. Therefore I would say that for the sake of security 
> there shouldn't be a
> boolean value, so people are not tempted to implement a risky 
> solution.
> 
> --- Matthias
> 
> 
> Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ 
www.livinglogic.de


"Craig R. McClanahan" wrote:
> 
> Maya Muchnik wrote:
> 
> > I have seen the similar behavior for edit option. The form
(struts-example) does
> > not display "*", but it does not require to re-enter password again
either.
> >
> 
> This behavior was changed due to concerns about the fact that the old
password would
> appear (in the HTML source) when you were on the login page and -- for
example --
> mistyped by one character your actual password.  A hacker who saw the
incorrect value
> is a lot closer to guessing the right one.
> 
> Would it make sense to have a boolean option to "have it your way" on
this?
> 
> Craig



Re: ActionForm property naming conventions

2001-02-14 Thread Craig R. McClanahan

[EMAIL PROTECTED] wrote:

> My question is best asked with an example... Why is it that I am unable to
> create a property named "nTerminal" for my ActionForm/JSP? This problem
> occurs when there is an uppercase letter in the 2nd position of the property
> name. If I change the name to "nterminal" or "ntErminal" then things work
> just fine. In other words- getNterminal() is recognized by Struts, but
> getNTerminal() is invalid and results in a runtime error in the html tag. Is
> this a limitation imposed by Javabean conventions or is this a Struts
> specific issue? (If you think I am crazy, then perhaps this problem is
> specific to WebLogic.)
>
> Thanks,
> Bob

Struts uses the introspection capabilities Java Reflection APIs -- in
particular, it calls java.beans.Introspector.getBeanInfo() -- to figure out the
names of the getter and setter methods for various properties.  The
introspector, in turn, enforces the design patterns that are documented in the
JavaBeans specification.  It is possible that there are some special cases for
the second letter of a property name being capitalized.

I would have expected "getNTerminal" and "setNTerminal" to work for a property
named "nTerminal".

Craig





RE: html:password

2001-02-14 Thread Shkuro, Yuri

I can't recall an application where a user would be prompted to edit
a password.  It's always

old password:
new password:
veify new password:

The only case where returning the password could make sence is when the
password field is on a very long form, where the user can make a mistake 
and has to return to this form - in this case it is quite annoying retyping
the password over and over.  However, smart sites bypass this and do not
show the password field after the first submission or show but don't require
entering it, even if the user is returned to the form on an error (e.g., one
can
encrypt it and store in a hidden field, and put some junk like 1234567 into
the password field to indicate that "something" was enterred and doesn't
have
to be retyped).

YS

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]

For login dialogs, it makes sense that you do not want the password echoed
(even
if it shows asterisks).  But what about the case of when you are editing an
existing password (as the Struts example application does)?  The behavior of
not
echoing actually broke this code.

Craig McClanahan




Re: Avoid JSP caching by the browser

2001-02-14 Thread Craig R. McClanahan

Lind Jürgen wrote:

> Hi there,
>
> I have the following problem: in order to prevent the web-browser
> from using cached versions of a jsp, we plan to add some unique
> timestamp (which will actually be ignored by the jsp) to the url
> that calls the jsp, e.g.:
>
> myjsp
>
> While this works fine when cookies are enabled, it fails when
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
>
> Using the html:link tag, however, introduces the difficulty how to
> dynamically add the timestamp. Using something like
>
> myjsp
>

This fails because you cannot intermix constant text and runtime expressions
in a single attribute -- it has to be one or the other:

myjsp

Note the use of single quotes around the entire expression so that the
parser doesn't get confused by the double quotes around Java strings.

>
> fails as the Java Code will not get interpreted but it will be literally
> appended  to the URL, causing a Decode Error in the receiving JSP.
>
> Has anyone experienced similar problems (with the web browser caching
> jsp pages) and could offer some help or are there any suggestions wrt.
> the above evaluation problem?
>

>
> Regards
>
> Jürgen
>

Craig McClanahan





Re: Old questions that die hard

2001-02-14 Thread Craig R. McClanahan

Maya Muchnik wrote:

> Thank you, David.
> I have tested struts-example with disabled JavaScript on Netscape. It is still
> working!!!
> Maya
>

The only JavaScript code in the Struts example is the attempt to set input focus
on the first field on each form.  In this case, the lack of JavaScript is pretty
innocuous.  For more complex user interfaces, JavaScript might be required (by the
app) to be turned on.

Craig





More HTML element examples

2001-02-14 Thread Robert Taylor

I've been through the examples included in the struts0.5 release.
Specifically I'm looking for examples of using the  element with
dynamically generated . I have seen the  element and read
its definition but still am unclear on how to use it.

For example, I want to retrieve some data from the database, populate a
HashMap and have the options list generated using the hash key as the value
attribute of the option tag and the hash value as the body of the option
tag.

If I have missed this somewhere in the documentation, I apologize. I scanned
the resources and did not see anything that looked like "html element
examples".

Robert Taylor
[EMAIL PROTECTED]
770.891.9858 (this may change soon)
http://www.mulework.com




Re: html:password

2001-02-14 Thread Craig R. McClanahan

Joerg Beekmann wrote:

> I argued not to echo the password when this first came up. I still feel that
> way and also feel there should not be a boolean allowing the password to be
> echoed back. Not everyone who sets the boolean to echo will understand the
> ramifications.
>
> I also don't believe we would be doing the user a service by echoing the
> password back, in fact quite the opposite. Think about it; presumably the
> password is displayed in the form  and is echoed back the same way. The
> use doesn't know which characters are incorrect so will need to select the
> entire password and retype it. It is simpler for them if the field is blank
> and has focus in which case they just type the password again and enter. In
> my experience that is the way logon dialogs work.
>

For login dialogs, it makes sense that you do not want the password echoed (even
if it shows asterisks).  But what about the case of when you are editing an
existing password (as the Struts example application does)?  The behavior of not
echoing actually broke this code.

>
> Joerg
>

Craig McClanahan





RE: must restart tomcat

2001-02-14 Thread Shkuro, Yuri

I am not aware of any mechanisms in Java to inspect a class and determine
its dependencies (although javac obviously has to do it, but its
proprietory).
I think this issue is too difficult for any container to handle
automatically.



-Original Message-
From: gustav spellauge [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 3:21 PM
To: [EMAIL PROTECTED]
Subject: Re: must restart tomcat


thanks,

that's what i thught but now i can be quit shure.

do you think/know if tmcat 4.x will support hotswapping of all dependencies
?

g.

"Shkuro, Yuri" wrote:

> Tomcat 3.2 only supports hot-swapping of servlet classes, but not their
> dependencies like bean classes, so you either have to restart Tomcat, or
> use its admin interface to remove your application context and add it
again.
>
> Note that the latter is not necessarily faster (usually takes me four hits
> on the URL: list/delete/add/list), unless you have many applications in
your
> webapp directory (and you shouldn't if you plan to restart often).  Also,
> I noticed that when a context is added via admin interface, Tomcat does
> not set init parameters for this context, which my application depends on.
>
> YS.
>
> -Original Message-
> From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 2:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: must restart tomcat
>
> I think, you need to config your server.xml file to tell to "reload" your
> classes after they are changed / rebuilt.
> Do you config server.xml for your new application?
>
> gustav spellauge wrote:
>
> > again my qustion:
> >
> > after a change in any of a formbean class or an action class i will have
> > to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
> >
> > is there any way to avoid this restart. maybe something is wrong with my
> > setup.
> >
> > thanks in advance
> >
> > g.



Re: must restart tomcat

2001-02-14 Thread gustav spellauge

thanks,

that's what i thught but now i can be quit shure.

do you think/know if tmcat 4.x will support hotswapping of all dependencies ?

g.

"Shkuro, Yuri" wrote:

> Tomcat 3.2 only supports hot-swapping of servlet classes, but not their
> dependencies like bean classes, so you either have to restart Tomcat, or
> use its admin interface to remove your application context and add it again.
>
> Note that the latter is not necessarily faster (usually takes me four hits
> on the URL: list/delete/add/list), unless you have many applications in your
> webapp directory (and you shouldn't if you plan to restart often).  Also,
> I noticed that when a context is added via admin interface, Tomcat does
> not set init parameters for this context, which my application depends on.
>
> YS.
>
> -Original Message-
> From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 14, 2001 2:47 PM
> To: [EMAIL PROTECTED]
> Subject: Re: must restart tomcat
>
> I think, you need to config your server.xml file to tell to "reload" your
> classes after they are changed / rebuilt.
> Do you config server.xml for your new application?
>
> gustav spellauge wrote:
>
> > again my qustion:
> >
> > after a change in any of a formbean class or an action class i will have
> > to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
> >
> > is there any way to avoid this restart. maybe something is wrong with my
> > setup.
> >
> > thanks in advance
> >
> > g.




Re: must restart tomcat

2001-02-14 Thread gustav spellauge

that's not the problem i duoblechecked it.

see the answer of  Maya Muchnik. i think that's the probalem.

tanks anyway.

g.

Maya Muchnik wrote:

> I think, you need to config your server.xml file to tell to "reload" your
> classes after they are changed / rebuilt.
> Do you config server.xml for your new application?
>
> gustav spellauge wrote:
>
> > again my qustion:
> >
> > after a change in any of a formbean class or an action class i will have
> > to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
> >
> > is there any way to avoid this restart. maybe something is wrong with my
> > setup.
> >
> > thanks in advance
> >
> > g.




AW: Struts and Frames

2001-02-14 Thread oliver . lauer

No, I guess not. We make heavy use of framesets and frames and we did not
config anything special.

You should use the target-property of your form in the logon.jsp to point
the result to the frame you came from.

Oliver

-- Original Nachricht --

>I'm working to build a web based application using Struts.  Currently we
>
>have a mocked-up prototype which uses frames (iframes in particular) to

>control what gets displayed on the screen.  In general the format of our
>or
>pages consists of three frames:
>
>Top (header/navigation stuff)
>Main (the thing the user is currently doing)
>Footer
>
>I've tried to "strutsifiy" this prototype but I haven't quite figured out
>
>the best way to handle things.  The one thing I did was convert the footer
>
>from "footer.html" to "footer.jsp".  This lets me dynamically change the
>
>content of the footer.  This seems to work.  I then tried to modify the

>main body.  I started by making the main body point to my "logon.do"
>action.  This worked fine.  The screen came up and my logon stuff was in
>
>the middle frame.  However, once the user logged on, my middle pane went
>
>blank.  In my config, I had the logon page forward to my success action,
>
>but my success action never displayed.  Is there anything special I need
>to
>do to make my struts application usable in a framed environment?
>
>Thanks!
>






Thanks

2001-02-14 Thread oliver . lauer

Hi,

today I want to thank everybody who was involved making STRUTS such a simple
but effective framework and to everybody in this mailing list showing the
world :-) that OpenSource is an working alternative.

We, that is a large insurance company (80.000 employees), today decided
to stuff our first (strategic) intranet project (location Germany) with
STRUTS.

Special Thanks to Graig, but Graig one thing left to say: Talk to your sun
and convice him to work with such cool things like JAVA and J2EE :-)).

Oliver






RE: Last Call for Struts 1.0 Bugs

2001-02-14 Thread Shkuro, Yuri

I don't know if this qualifies as a bug or a feature proposal.

I am using Structs as a framework to a sample application that generates
a report.  The application has two kinds of users (regular and superuser),
who must set certain parameters before doing POST to /report.do
The problem is that regular users go directly to /report.do (via GET)
and "print" must be "=screen" for them, which is achieved by setting the
property of the form bean to "screen" in form's reset() method.  On the
other hand, superusers go to report from a JSP page (via POST), where they
select the parameter value like this:


   Printer-friendly
   Screen-friendly
  


Since the form doesn't exist when JSP is called, it's created with
print=screen, and superuser see the second radio-button checked, where
is the business requirement is that the first is selected by default.
Unfortunately,  does not allow overriding form's default
settings.  It would be nice to do something like this:


   Printer-friendly
   Screen-friendly
  


which takes precedence over default values from reset() method if the form
didn't exist in the first place.  It seems like a simple thing to do, but
I don't know if this can make its way to Struts 1.0

Also, it would be correct to have a method in the ActionForm inteface that 
indicates to the action class whether the form properties were populated 
from the request or they were set to default values by the form's reset() 
method (something like HttpSession.isNew() ).

YS.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 5:31 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Last Call for Struts 1.0 Bugs


The few remaining Struts bug reports are feeling kind of lonely.  Do you
have any more bugs that you would like to see fixed before Struts 1.0 is
released?  If so, please post them to the bug tracking system at:

http://nagoya.apache.org/bugzilla/

under product "Struts".  Even if the bug has been reported to a Struts
mailing list, this is the best way to ensure that your bug does not get
missed in the final rush towards release.

Feature requests are welcome as well, of course, but the focus right at
the moment is on identifying and squashing any remaining bugs so that
1.0 comes out of the box as an extremely solid platform for building web
applications.

Craig McClanahan




RE: must restart tomcat

2001-02-14 Thread Shkuro, Yuri

Tomcat 3.2 only supports hot-swapping of servlet classes, but not their 
dependencies like bean classes, so you either have to restart Tomcat, or 
use its admin interface to remove your application context and add it again.

Note that the latter is not necessarily faster (usually takes me four hits 
on the URL: list/delete/add/list), unless you have many applications in your
webapp directory (and you shouldn't if you plan to restart often).  Also,
I noticed that when a context is added via admin interface, Tomcat does
not set init parameters for this context, which my application depends on.

YS.

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: Re: must restart tomcat


I think, you need to config your server.xml file to tell to "reload" your
classes after they are changed / rebuilt.
Do you config server.xml for your new application?

gustav spellauge wrote:

> again my qustion:
>
> after a change in any of a formbean class or an action class i will have
> to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
>
> is there any way to avoid this restart. maybe something is wrong with my
> setup.
>
> thanks in advance
>
> g.



Struts and Frames

2001-02-14 Thread James Howe

I'm working to build a web based application using Struts.  Currently we 
have a mocked-up prototype which uses frames (iframes in particular) to 
control what gets displayed on the screen.  In general the format of our or 
pages consists of three frames:

Top (header/navigation stuff)
Main (the thing the user is currently doing)
Footer

I've tried to "strutsifiy" this prototype but I haven't quite figured out 
the best way to handle things.  The one thing I did was convert the footer 
from "footer.html" to "footer.jsp".  This lets me dynamically change the 
content of the footer.  This seems to work.  I then tried to modify the 
main body.  I started by making the main body point to my "logon.do" 
action.  This worked fine.  The screen came up and my logon stuff was in 
the middle frame.  However, once the user logged on, my middle pane went 
blank.  In my config, I had the logon page forward to my success action, 
but my success action never displayed.  Is there anything special I need to 
do to make my struts application usable in a framed environment?

Thanks!




AW: Forwarding an action to multiple JSPs

2001-02-14 Thread oliver . lauer

We have the same problem. We forward our "success" to a frameset (jsp) with
two frames included that point to different jsps. The  problem we have with
this approach is the fact that we produce three requests and 'loose' our
errors because those are bound to different requests.

Oliver

-- Original Nachricht --

>Is there a way to forward a request to more than on
>JSP from the same action class, and have the JSPs
>updated different frames?
>
>Scenerio:
>When a user logs into the system and the login request
>gets forwarded to the "LoginAction" class, I would
>like to forward this request to two JSPs: 1.) To
>perform the normal authentication routine and display
>the resulting success/failure message to a particular
>frame, and 2.) to get a list of the users currently
>logged into the system and display it in a separate
>frame.
>
>Any help/pointers would be greatly appreciated.
>
>Shad.
>
>__
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail - only $35
>a year!  http://personal.mail.yahoo.com/
>






Re: must restart tomcat

2001-02-14 Thread Maya Muchnik

I think, you need to config your server.xml file to tell to "reload" your
classes after they are changed / rebuilt.
Do you config server.xml for your new application?

gustav spellauge wrote:

> again my qustion:
>
> after a change in any of a formbean class or an action class i will have
> to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.
>
> is there any way to avoid this restart. maybe something is wrong with my
> setup.
>
> thanks in advance
>
> g.




must restart tomcat

2001-02-14 Thread gustav spellauge

again my qustion:

after a change in any of a formbean class or an action class i will have
to restart tomcat (3.2) otherwise my app. runs into cast-exceptions.

is there any way to avoid this restart. maybe something is wrong with my
setup.

thanks in advance

g.




Forwarding an action to multiple JSPs

2001-02-14 Thread Shad

Is there a way to forward a request to more than on
JSP from the same action class, and have the JSPs
updated different frames?

Scenerio:
When a user logs into the system and the login request
gets forwarded to the "LoginAction" class, I would
like to forward this request to two JSPs: 1.) To
perform the normal authentication routine and display
the resulting success/failure message to a particular
frame, and 2.) to get a list of the users currently
logged into the system and display it in a separate
frame.

Any help/pointers would be greatly appreciated.

Shad.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



Re: [Fwd: Re: Taglib URI error in Weblogic60]

2001-02-14 Thread Maya Muchnik


Sorry to bother you again. It was a problem with web.xml file. The problem
was correct.
Maya Muchnik wrote:
Guys, you are very good! Please help Mark.
 Original Message 


Subject: 

Re: Taglib URI error in Weblogic60



Date: 

Wed, 14 Feb 2001 14:22:41 -0500



From: 

Maya Muchnik <[EMAIL PROTECTED]>



Reply-To: 

[EMAIL PROTECTED]



Organization: 

Puma Technology



To: 

[EMAIL PROTECTED]



References: 

<001d01c096ba$7eef7680$[EMAIL PROTECTED]>



The last my attempt.
Mark,
Do you have "-" in the following or this is your typing:
in jsp
    -<%@
taglib uri="taglib" prefix="input" %>
in web.xml
    -
Maya
Mark Scott wrote:
>Try to use "/taglib" instead of "taglib" in both
>your JSP pages and and web.xml. Also make sure the "taglib.tld"
>file is actually under the directory "WEB-INF" of your web application
All these are true, I've tried numerous combinations, still the mesg
persists
my jsp is under my webapp root
the web.xml & taglib.tld are both in WEB-INF
see my code below..
Can anyone help with this ?
-Original Message-
From: Hui Lin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 1:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Taglib URI error in Weblogic60
Try to use "/taglib" instead of "taglib" in both
your JSP pages and and web.xml. Also make sure the "taglib.tld"
file is actually under the directory "WEB-INF" of your web application
Hui Lin
-Original Message-
From: Mark Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:17 PM
To: [EMAIL PROTECTED]
Subject: Taglib URI error in Weblogic60
Hi All,
having some trouble deploying my custom Tag, this is the error...
thanks in advance
Parsing of JSP File '/test/tagpage.jsp' failed:
/test/tagpage.jsp(1): Could not parse deployment descriptor:
java.io.IOException: cannot resolve 'taglib' into a valid tag library
probably occurred due to an error in /test/tagpage.jsp line 1:
<%@ taglib uri="taglib" prefix="input" %>
 --
my directories look like this
myserver
    test
   
- tagpage.jsp
WEB-INF
-web.xml
-taglib.tld
---
my code:
in jsp
    -<%@ taglib uri="taglib"
prefix="input" %>
in web.xml
    -
    1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

    
   
taglib
   
/WEB-INF/taglib.tld
    





[Fwd: Re: Taglib URI error in Weblogic60]

2001-02-14 Thread Maya Muchnik


Guys, you are very good! Please help Mark.
 Original Message 


Subject: 

Re: Taglib URI error in Weblogic60



Date: 

Wed, 14 Feb 2001 14:22:41 -0500



From: 

Maya Muchnik <[EMAIL PROTECTED]>



Reply-To: 

[EMAIL PROTECTED]



Organization: 

Puma Technology



To: 

[EMAIL PROTECTED]



References: 

<001d01c096ba$7eef7680$[EMAIL PROTECTED]>



The last my attempt.
Mark,
Do you have "-" in the following or this is your typing:
in jsp
    -<%@
taglib uri="taglib" prefix="input" %>
in web.xml
    -
Maya
Mark Scott wrote:
>Try to use "/taglib" instead of "taglib" in both
>your JSP pages and and web.xml. Also make sure the "taglib.tld"
>file is actually under the directory "WEB-INF" of your web application
All these are true, I've tried numerous combinations, still the mesg
persists
my jsp is under my webapp root
the web.xml & taglib.tld are both in WEB-INF
see my code below..
Can anyone help with this ?
-Original Message-
From: Hui Lin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 1:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Taglib URI error in Weblogic60
Try to use "/taglib" instead of "taglib" in both
your JSP pages and and web.xml. Also make sure the "taglib.tld"
file is actually under the directory "WEB-INF" of your web application
Hui Lin
-Original Message-
From: Mark Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 12:17 PM
To: [EMAIL PROTECTED]
Subject: Taglib URI error in Weblogic60
Hi All,
having some trouble deploying my custom Tag, this is the error...
thanks in advance
Parsing of JSP File '/test/tagpage.jsp' failed:
/test/tagpage.jsp(1): Could not parse deployment descriptor:
java.io.IOException: cannot resolve 'taglib' into a valid tag library
probably occurred due to an error in /test/tagpage.jsp line 1:
<%@ taglib uri="taglib" prefix="input" %>
 --
my directories look like this
myserver
    test
   
- tagpage.jsp
WEB-INF
-web.xml
-taglib.tld
---
my code:
in jsp
    -<%@ taglib uri="taglib"
prefix="input" %>
in web.xml
    -
    1.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

    
   
taglib
   
/WEB-INF/taglib.tld
    




RE: html:password

2001-02-14 Thread Joerg Beekmann

I argued not to echo the password when this first came up. I still feel that
way and also feel there should not be a boolean allowing the password to be
echoed back. Not everyone who sets the boolean to echo will understand the
ramifications. 

I also don't believe we would be doing the user a service by echoing the
password back, in fact quite the opposite. Think about it; presumably the
password is displayed in the form  and is echoed back the same way. The
use doesn't know which characters are incorrect so will need to select the
entire password and retype it. It is simpler for them if the field is blank
and has focus in which case they just type the password again and enter. In
my experience that is the way logon dialogs work.

Joerg


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Matthias Bauer
> Sent: February 14, 2001 12:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: html:password
> 
> 
> As I asked the original question on the new behaviour for the 
> password field,
> let me say this: I did not see the problem when I asked my 
> question, but now I
> am perfectly aware (and I admit, it is quite obvious) of the 
> security risk you
> are imposing when you send the current value of the password 
> along in the html
> source. Therefore I would say that for the sake of security 
> there shouldn't be a
> boolean value, so people are not tempted to implement a risky 
> solution.
> 
> --- Matthias
> 
> 
> Matthias Bauer +++ [EMAIL PROTECTED] +++ LivingLogic AG +++ 
www.livinglogic.de


"Craig R. McClanahan" wrote:
> 
> Maya Muchnik wrote:
> 
> > I have seen the similar behavior for edit option. The form
(struts-example) does
> > not display "*", but it does not require to re-enter password again
either.
> >
> 
> This behavior was changed due to concerns about the fact that the old
password would
> appear (in the HTML source) when you were on the login page and -- for
example --
> mistyped by one character your actual password.  A hacker who saw the
incorrect value
> is a lot closer to guessing the right one.
> 
> Would it make sense to have a boolean option to "have it your way" on
this?
> 
> Craig



Global URL Parameter or better idea ??

2001-02-14 Thread Lavin, Dave


We are building a large scale WebLogic 6.0 application using Struts and I
have an implementation question.

We have a need to address multiple browser windows on the same client
separately.  Our application data is based on the user being part of a
'location' and we want to support an administrator that would have the
ability to administer multiple locations simultaneously from 1 client using
multiple browser windows.  Since multiple browsers share the same session
ID, we can't save the location id in the session.  

We don't know of a better way to track each browser's activity separately
without placing a URL parameter on the end of all the links on a given page
so that the link would tell us what location this request is directed at as
in this sample link:

http://sampledomain.com/login.do?location=0001

If this is the best solution, is there a way in Struts to specify a global
parameter that would automatically get transferred from the request to the
response and then get tagged onto every URL that is created using the struts
HTTP tags?

We did implement code that modifies the classes in struts to allow what we
call an AutoForwardParm in the web.xml file.  We then modified the taglib
for each tag that generates a URL link and we append the value of this
AutoForwardParm.

Our team is new to web development and we may be missing something obvious
in HTTP or the Servlet spec.  Please advise kindly.

Any input is appreciated.

Dave Lavin


 application/ms-tnef


Re: Using ActionErrors

2001-02-14 Thread Maya Muchnik



I think (sorry if I am wrong or give a bad suggestion) that you can have
a pair (boolean - field) in your form. And in your ActionForm set this
boolean to true if an error occurs. Then in your jsp file test this boolean
for "true" value. If so - display some image before your field (or you
can change a color for the field). Adjust your fields so, then enough space
will be for the image.
Maya
Padma Ginnaram wrote:
 I
need to put the indicator right next to the field(s) that result in error. As
Hal explains in his response that the error description can be displayed
using the property name corresponding to the field. Instead of displaying
the error description I need to conditionally display an image or highlight
the field in some way if an error exists corresponding to that field's
property.Appreciate
your help.

-Original
Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February
14, 2001 12:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Using ActionErrors
 
Padma,
Can you be more specific? Do you need to display an error corresponding
a label to the field, or you need to display a field number ? I think,
struts-example shows how to display a field label together with its error.
And all errors are displayed on the top of the page. Do you need something
different?
Maya
Padma Ginnaram wrote:

I
need to display an indicator for the fields that result in error and display
all the errors on the top of the page. Using the error tag I can display
all the errors at one location, but I am not able to figure out how to
display the indicator. Any suggestions?
-Original
Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13,
2001 5:07 PM
To: [EMAIL PROTECTED]
Subject: RE: Using ActionErrors
 
I
haven't tried it but I thought that you could specify the property attribute
on the errors tag and it would pull out the error that has that property.
When you add to the ActionErrors object the property is the first argument.
You should probably use the property name that cooresponds to the property
of the form field. -Original
Message-
From: David J Snowsill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13,
2001 4:31 PM
To: [EMAIL PROTECTED]
Subject: Using ActionErrors
 
Can
anybody point me in the right direction on how to associate a particular
error with a particular input field in a form Thanks
David J Snowsill
Principal Consultant
Calibre Financial Technology
[EMAIL PROTECTED]
Office: (61-2) 9212 0527
Mobile: 0403 091 468
***
This E-mail is intended only for the
use of the individual or entity named
above and may contain information
that is confidential and privileged.
 If you are not the intended
recipient, you are hereby notified that any
dissemination, distribution or copying
of this E-mail is strictly prohibited.
 If you have received this E-mail
in error, please notify us immediately
by return e-mail to the sender or
by telephoning one of our staff on (61-2)
9212 0527.  Please then destroy
any copies of the original message that
are in your possession. Thank you.
***









RE: Using ActionErrors

2001-02-14 Thread Padma Ginnaram



I need 
to put the indicator right next to the field(s) that result in error. 
As Hal explains in his response that the error 
description can be displayed using the property name corresponding to the field. 
Instead of displaying the error description I need to conditionally display an 
image or highlight the field in some way if an error exists corresponding to 
that field's property.
 
Appreciate your help.

  -Original Message-From: Maya Muchnik 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 14, 2001 
  12:32 PMTo: [EMAIL PROTECTED]Subject: Re: 
  Using ActionErrorsPadma, 
  Can you be more specific? Do you need to display an error corresponding a 
  label to the field, or you need to display a field number ? I think, 
  struts-example shows how to display a field label together with its error. And 
  all errors are displayed on the top of the page. Do you need something 
  different? 
  Maya 
  Padma Ginnaram wrote: 
  

I need to display an indicator for the fields that result in error 
and display all the errors on the top of the page. Using the error tag I can 
display all the errors at one location, but I am not able to figure out how 
to display the indicator. Any suggestions? -Original Message- From: Deadman, Hal [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 13, 2001 
5:07 PM To: 
[EMAIL PROTECTED] Subject: RE: Using ActionErrors   
I haven't tried it but I thought that you could specify the 
  property attribute on the errors tag and it would pull out the error that 
  has that property. When you add to the ActionErrors object the property is 
  the first argument. You should probably use the property name that 
  cooresponds to the property of the form 
  field. -Original Message- From: David J Snowsill [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, February 13, 
  2001 4:31 PM To: 
  [EMAIL PROTECTED] Subject: Using ActionErrors   
  Can anybody point me in the right direction on how to associate 
a particular error with a particular input field in a 
form Thanks David J 
Snowsill Principal 
Consultant Calibre 
Financial Technology [EMAIL PROTECTED] 
Office: (61-2) 9212 
0527 Mobile: 0403 091 
468 *** 
This E-mail is intended only for the 
use of the individual or entity named above and may contain information that is 
confidential and privileged.  If you are not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this E-mail is 
strictly prohibited.  If you have received this E-mail in error, please notify 
us immediately by 
return e-mail to the sender or by telephoning one of our staff on 
(61-2) 9212 0527.  
Please then destroy any copies of the original message 
that are in your 
possession. Thank you. ***


Re: Using ActionErrors

2001-02-14 Thread Maya Muchnik



Padma,
Can you be more specific? Do you need to display an error corresponding
a label to the field, or you need to display a field number ? I think,
struts-example shows how to display a field label together with its error.
And all errors are displayed on the top of the page. Do you need something
different?
Maya
Padma Ginnaram wrote:

I
need to display an indicator for the fields that result in error and display
all the errors on the top of the page. Using the error tag I can display
all the errors at one location, but I am not able to figure out how to
display the indicator. Any suggestions?
-Original
Message-
From: Deadman, Hal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13,
2001 5:07 PM
To: [EMAIL PROTECTED]
Subject: RE: Using ActionErrors
 
I
haven't tried it but I thought that you could specify the property attribute
on the errors tag and it would pull out the error that has that property.
When you add to the ActionErrors object the property is the first argument.
You should probably use the property name that cooresponds to the property
of the form field. -Original
Message-
From: David J Snowsill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13,
2001 4:31 PM
To: [EMAIL PROTECTED]
Subject: Using ActionErrors
 
Can
anybody point me in the right direction on how to associate a particular
error with a particular input field in a form Thanks David
J Snowsill
Principal Consultant
Calibre Financial Technology
[EMAIL PROTECTED]
Office: (61-2) 9212 0527
Mobile: 0403 091 468 ***
This E-mail is intended only for the
use of the individual or entity named
above and may contain information
that is confidential and privileged.
 If you are not the intended
recipient, you are hereby notified that any
dissemination, distribution or copying
of this E-mail is strictly prohibited.
 If you have received this E-mail
in error, please notify us immediately
by return e-mail to the sender or
by telephoning one of our staff on (61-2)
9212 0527.  Please then destroy
any copies of the original message that
are in your possession. Thank you.
***







Re: iterate / bean write problem

2001-02-14 Thread Craig Tataryn

Basically, when the "property" attribute is used with the logic:iterate tag, it
assumes that there is a jsp bean that you made available in your session named
 and that this bean has a
property named , it then uses
this property as the object it will iterate through.

So in your example, the iterator is expected to be the  "orders.Orders" property
(you shouldn't capitalize the "O" on orders).  It also assumes that your "Order"
object has getters named getORDER_ID() and getREVEIVER_NAME().  If this is not the
case, and you really have getters of format getOrder_Id() and getReceiver_Name,
please use all lowercase characters for your bean:write property value (except for
letters that are actually capitialized in the getters excluding the first
character).

I think what you want to do is just get rid of the "property" attribute and change
your code to look like this:



  

  


  

  




[EMAIL PROTECTED] wrote:

> Hello,
>
> I'm struggling with a problem about iterate and bean write as used in the
> example application.
>
> I have an object OrderList which is registered as the attribute "orders". This
> object contains
> objects from the type Order (OrderList actually is an ArrayList). There is a
> property getter method
> for OrderList available which returns an array of Order objects (Order[]). It is
> named getOrders().
>
> So I want Struts to browse through the list of orders and display the properties
> of each Order object
> inside the list.
>
> The portion of my JSP file looks like:
>
> 
> 
>   
> 
>   
> 
> 
>   
> 
>   
> 
> 
>
> But when I run the application, I get the error message:
>
> javax.servlet.ServletException: No bean found for attribute key ord
> ...
>
> I think I have to register a bean for the Order objects, but I did not know how
> to to it.
> I have no idea what I have to do to get this running.
>
> What do you suggest?
>
> Regards
>
> Michael

--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



RE: Using ActionErrors

2001-02-14 Thread Padma Ginnaram



I need 
to display an indicator for the fields that result in error and display all the 
errors on the top of the page. Using the error tag I can display all the errors 
at one location, but I am not able to figure out how to display the indicator. 
Any suggestions?
 -Original Message-From: 
Deadman, Hal [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 
13, 2001 5:07 PMTo: [EMAIL PROTECTED]Subject: 
RE: Using ActionErrors

  I 
  haven't tried it but I thought that you could specify the property attribute 
  on the errors tag and it would pull out the error that has that property. When 
  you add to the ActionErrors object the property is the first argument. You 
  should probably use the property name that cooresponds to the property of the 
  form field. 
   
   -Original 
  Message-From: David J Snowsill 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, February 13, 
  2001 4:31 PMTo: [EMAIL PROTECTED]Subject: 
  Using ActionErrors
  
Can anybody point me in the right direction on 
how to associate a particular error with a particular input field in a 
form
 
Thanks
 
David J SnowsillPrincipal 
ConsultantCalibre Financial Technology[EMAIL PROTECTED]Office: 
(61-2) 9212 0527Mobile: 0403 091 468
 
***This E-mail is 
intended only for the use of the individual or entity namedabove and may 
contain information that is confidential and privileged. If you are 
not the intended recipient, you are hereby notified that 
anydissemination, distribution or copying of this E-mail is strictly 
prohibited. If you have received this E-mail in error, please 
notify us immediatelyby return e-mail to the sender or by telephoning 
one of our staff on (61-2)9212 0527.  Please then destroy any 
copies of the original message thatare in your possession. Thank 
you.***


RE: Unable to start Tomcat with Struts

2001-02-14 Thread Deadman, Hal

The following was posted by Craig yesterday and it should answer all of your
classpath questions related to struts.jar. The short version is just put
struts.jar in WEB-INF/lib and do not put WEB-INF/lib in your tomcat
classpath. Do not put it any other location that tomcat can see. 

---from craig

There has been some confusion around the issue of placing "struts.jar"
on your CLASSPATH at execution time, in a servlet container like Tomcat
that makes all such libraries visible to web applications.  This message
is an attempt to clarify the issues, and document why this is
prohibited.

* The "struts.jar" must appear on your classpath at
  compile time for your web application.  The easiest
  way to make this happen is to use an Ant "build.xml"
  file (like Struts itself does) that sets the classpath
  dynamically, or create a custom shell script that sets
  the classpath temporarily for compiling Struts based
  classes.

* The "servlet.jar" file (from your servlet container) must
  be on your classpath at compile time as well, because
  your application's Action classes will refer to interfaces
  that are defined here.

* For reasons discussed further below, "struts.jar" MUST NOT
  be on your system CLASSPATH when you start your servlet
  container (in particular, this applies to Tomcat).

* Placing JAR files in $JAVA_HOME/jre/lib/ext (the system
  extensions directory for Java2) is the same as placing them
  on the classpath.  In other words, you will NOT want to put
  "struts.jar" or "servlet.jar" there.

* For Tomcat, placing JAR files in the "lib" directory (as opposed
  to the WEB-INF/lib directory of your web app) causes them to
  be added to the CLASSPATH automatically.  Therefore, you should
  not put struts.jar here either.

The reason that putting "struts.jar" on your classpath is a bad idea has
to do with the way classloaders work in most servlet containers.  The
details differ between them -- but here is the scoop for Tomcat (3.x and
4.x):

* The library files that are placed on the CLASSPATH when
  Tomcat starts up are made visible through the "system"
  class loader.

* Each individual web application has a custom class loader
  created for it, which makes the classes in WEB-INF/classes
  and WEB-INF/lib visible.  The "parent" class loader of this
  custom class loader is set to the system class loader mentioned
  above.

* When classes are loaded, the JVM starts at the bottom of the
  hierarchy of class loaders, with the webapp class loader, and
  works its way up the hierarchy until it finds that class.  Thus, if
  you have struts.jar in the system classpath, classes from struts.jar
  will be loaded by the system class loader instead of the web app
  class loader.

* When a loaded class references other classes, it looks in its own
  class loader first, and then up the hierarchy.  Under NO circumstances

  will it go down the hierarchy.

* Therefore, if a Struts class is loaded from the system class path,
  that class CANNOT see any of your application classes in
WEB-INF/classes
  or WEB-INF/lib -- you will get ClassNotFoundException instead.

This is the reason that the Struts example application will not run when
you have "struts.jar" on your CLASSPATH.  The digester module of Struts
is loaded from the system class path.  Therefore, it cannot see the
"User" class of the example app, because that class is under
WEB-INF/classes.

If you find that you need to put "struts.jar" on your system classpath
to make Struts work in Tomcat, that means your Tomcat install has been
corrupted.  If you find that your own app will not work UNLESS
struts.jar is in the system classpath, there is something about your
application organization that needs to be analyzed in detail.

Craig

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 11:57 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unable to start Tomcat with Struts


David,
I tried having the struts.jar in both places that you mentioned and made
sure the classpath reflected the location. But no change...I am still
getting the same error.  Should I completely remove the jar from one
location if I am pointing to the other location in my classpath?  Would that
create problems?  Still not functional.

Here is another possible clue from a list member:  (does this help?)
"error when the database servlet starts up and tries to
load user objects from the persisted data in the database.xml file.
For some reason, the class loader isn't finding
org.apache.struts.example.User although it is definitly in the right
place."

Any info is appreciated,
Jessica

-Original Message-
From: David Maycock [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 10:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unable to start Tomcat with Struts


Check where the struts.jar file is placed.  I had this problem when the jar
file was placed in the tomcat\lib directory rather than the
tomcat\webapps\xx\web-inf\lib 

Re: controlling the next page to be displayed

2001-02-14 Thread Eric Cheng

The way I implemented this is I define multiple forwards in the config file 
such as


...
...
and in my action class, I have
  if (cond1) return mapping.findForward("cond1");
  else if (cond2) return mapping.findForward("cond2");
  ...
  ...

I'm interested to see how other people handle this.

Eric

>From: Ratnadeep Bhattacharjee <[EMAIL PROTECTED]>
>Reply-To: Ratnadeep Bhattacharjee <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: controlling the next page to be displayed
>Date: Wed, 14 Feb 2001 11:52:26 -0500 (EST)
>
>Hi,
>
>I am quite new to Struts and was wondering if someone could help me with 
>the
>following issue:
>
>I am on a web page and I have entered some data and I click on Submit. Now, 
>the
>Action class correspoding to its JSP page gets executed. I would like the
>perform() method of the Action class to determine the next page that should 
>be
>displayed (based on data I had entered).
>
>If I use
>   return (mapping.findForward("success"))
>
>I can go to one page only - the one that is mentioned in my 
>struts-config.xml.
>
>   
>
>I would like to go to one of many pages on success.
>
>
>Thanks,
>-Deep.
>
>
>

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




Re: controlling the next page to be displayed

2001-02-14 Thread Craig Tataryn

Craig M. answered this question yesterday in a mail titled: "Proper way to
'forward' dynamically"


When I need this, I just create a new ActionForward dynamically:

String path = ... create context-relative path to new page ...
return (new ActionForward(path));

The path you calculate must be context relative and start with a slash, exactly
like the "path" attributes to your standard  elements.


Ratnadeep Bhattacharjee wrote:

> Hi,
>
> I am quite new to Struts and was wondering if someone could help me with the
> following issue:
>
> I am on a web page and I have entered some data and I click on Submit. Now, the
> Action class correspoding to its JSP page gets executed. I would like the
> perform() method of the Action class to determine the next page that should be
> displayed (based on data I had entered).
>
> If I use
> return (mapping.findForward("success"))
>
> I can go to one page only - the one that is mentioned in my struts-config.xml.
>
> 
>
> I would like to go to one of many pages on success.
>
> Thanks,
> -Deep.

--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



iterate / bean write problem

2001-02-14 Thread michael . brohl




Hello,

I'm struggling with a problem about iterate and bean write as used in the
example application.

I have an object OrderList which is registered as the attribute "orders". This
object contains
objects from the type Order (OrderList actually is an ArrayList). There is a
property getter method
for OrderList available which returns an array of Order objects (Order[]). It is
named getOrders().

So I want Struts to browse through the list of orders and display the properties
of each Order object
inside the list.

The portion of my JSP file looks like:



  

  


  

  




But when I run the application, I get the error message:

javax.servlet.ServletException: No bean found for attribute key ord
...


I think I have to register a bean for the Order objects, but I did not know how
to to it.
I have no idea what I have to do to get this running.

What do you suggest?

Regards

Michael








RE: Unable to start Tomcat with Struts

2001-02-14 Thread Anderson, Jessica

David,
I tried having the struts.jar in both places that you mentioned and made
sure the classpath reflected the location. But no change...I am still
getting the same error.  Should I completely remove the jar from one
location if I am pointing to the other location in my classpath?  Would that
create problems?  Still not functional.

Here is another possible clue from a list member:  (does this help?)
"error when the database servlet starts up and tries to
load user objects from the persisted data in the database.xml file.
For some reason, the class loader isn't finding
org.apache.struts.example.User although it is definitly in the right
place."

Any info is appreciated,
Jessica

-Original Message-
From: David Maycock [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 10:39 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Unable to start Tomcat with Struts


Check where the struts.jar file is placed.  I had this problem when the jar
file was placed in the tomcat\lib directory rather than the
tomcat\webapps\xx\web-inf\lib directory.  This screws up all the dynamic
class loading within tomcat.  Hope this helps

David

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: 14 February 2001 16:14
To: '[EMAIL PROTECTED]'
Subject: Unable to start Tomcat with Struts


Hi,
I am trying to install struts and am receiving the following error when
attempting to start tomcat.  Can anyone shed light on my situation?  I've
got jaxp1.0.1, and the test example for it worked properly.

Thanks,
Jessica Anderson

Starting tomcat. Check logs/tomcat.log for error messages
New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
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.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java:498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:283)
at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:178)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
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 java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:620)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLo
ader.java:464)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:401)
at
org.apache.tomcat.loader

Re: Please, help with strange exception

2001-02-14 Thread Craig Tataryn


The current version of the docs: http://jakarta.apache.org/struts/userGuide/building_view.html#forms
doesn't seem to have the problem.  Are you using an old version of
the documents?
Craig.
Michael Grushko wrote:
 Thank
you Craig. It is work now. Strange ... I took this name of attribute from
documentation (3.3.1. - example)

-Original
Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February
14, 2001 7:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Please, help
with strange exception
 
As suspected, replace: name="username" size="10"/>
with property="username" size="10"/>
The name attribute is to be used to specify the name of the bean the
property attribute applies to.  In this case, you don't have to specify
a bean name because it is within a  which will default
the name attribute to the formBean setup for the current controller.
Hope that helps,
Craig.
 
 


--
I've been trying to change the world for years, but they just won't
give me the source code
 

begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



controlling the next page to be displayed

2001-02-14 Thread Ratnadeep Bhattacharjee

Hi,

I am quite new to Struts and was wondering if someone could help me with the 
following issue:

I am on a web page and I have entered some data and I click on Submit. Now, the 
Action class correspoding to its JSP page gets executed. I would like the 
perform() method of the Action class to determine the next page that should be 
displayed (based on data I had entered). 

If I use 
return (mapping.findForward("success"))

I can go to one page only - the one that is mentioned in my struts-config.xml. 



I would like to go to one of many pages on success.


Thanks,
-Deep.






RE: Avoid JSP caching by the browser

2001-02-14 Thread SHROM,BENJAMIN (HP-USA,ex1)

Hi,
You can try:



Regards,
Benjamin.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
g]On Behalf Of Lind Jürgen
Sent: Wednesday, February 14, 2001 6:56 AM
To: [EMAIL PROTECTED]
Subject: AW: Avoid JSP caching by the browser



> -Ursprungliche Nachricht-
> Von:  Lind Jurgen [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Mittwoch, 14. Februar 2001 11:18
> An:   [EMAIL PROTECTED]
> Betreff:  Avoid JSP caching by the browser
> 
> Hi there,
> 
> I have the following problem: in order to prevent the web-browser 
> from using cached versions of a jsp, we plan to add some unique 
> timestamp (which will actually be ignored by the jsp) to the url 
> that calls the jsp, e.g.:
> 
> myjsp
> 
> While this works fine when cookies are enabled, it fails when 
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
> 
> Using the html:link tag, however, introduces the difficulty how to 
> dynamically add the timestamp. Using something like
> 
> myjsp
> 
> fails as the Java Code will not get interpreted but it will 
> be literally 
> appended  to the URL, causing a Decode Error in the receiving JSP.
> 
> Has anyone experienced similar problems (with the web browser caching 
> jsp pages) and could offer some help or are there any 
> suggestions wrt. 
> the above evaluation problem?
> 
> []  Hi,
> 
> i have not tried all the attributes of the tag "link" in 
> struts-html.tld. But a simple workaround
> could be 
> myjsp 
> (or not?)
> 
> Dimitris
> 

no, because then I run into the same problem as before as soon as
cookies are disabled..

regards

Jürgen



RE: Please, help with strange exception

2001-02-14 Thread Michael Grushko



Thank 
you Craig. It is work now. Strange ... I took this name of attribute from 
documentation (3.3.1. - example)

  -Original Message-From: Craig Tataryn 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 14, 2001 
  7:11 PMTo: [EMAIL PROTECTED]Subject: Re: 
  Please, help with strange exceptionAs suspected, replace: 
  name="username" size="10"/> with property="username" size="10"/> 
  The name attribute is to be used to specify the name of the bean the 
  property attribute applies to.  In this case, you don't have to specify a 
  bean name because it is within a  which will default the 
  name attribute to the formBean setup for the current controller. 
  Hope that helps, Craig. 
   


Re: Unable to start Tomcat with Struts

2001-02-14 Thread Maya Muchnik

Jessica,

There were a lot of errors posted to this email list with similar error
messages. Check where struts.jar is located in your computer and if you added
its any location to CLASSPATH.

Maya

"Anderson, Jessica" wrote:

> Hi,
> I am trying to install struts and am receiving the following error when
> attempting to start tomcat.  Can anyone shed light on my situation?  I've
> got jaxp1.0.1, and the test example for it worked properly.
>
> Thanks,
> Jessica Anderson
>
> Starting tomcat. Check logs/tomcat.log for error messages
> New org.apache.struts.example.User
> Begin event threw exception
> java.lang.ClassNotFoundException: org.apache.struts.example.User
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
> 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.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
> at
> org.apache.struts.digester.Digester.startElement(Digester.java:498)
> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
> at com.sun.xml.parser.Parser.content(Parser.java:1499)
> at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
> at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
> at com.sun.xml.parser.Parser.parse(Parser.java:284)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
> at org.apache.struts.digester.Digester.parse(Digester.java:716)
> at
> org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:283)
> at
> org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:178)
> at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> at
> org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
> at
> org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
> at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
> Interceptor.java:132)
> at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
> at
> org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
> Exception in thread "main" java.lang.NoClassDefFoundError:
> javax/servlet/http/HttpServlet
> 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 java.lang.ClassLoader.loadClass(ClassLoader.java:290)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> at java.lang.ClassLoader.findSystemClass(ClassLoader.java:620)
> at
> org.apache.tomcat.loader.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLo
> ader.java:464)
> at
> org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
> ava:401)
> at
> org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
> er.java:141)
> at
> org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:294)
> at
> org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
> at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
> Interceptor.java:132)
> at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
> at
> org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
>
> Also, getting this error in tomcat servlet log:
> Context log path="/struts-example" :tomcat.errorPage: init
> Context log path="/struts-example" :jsp: init
> Context log path="/struts-example" :default: init
> Context log path="/struts-example" :database: init
> Context lo

RE: Unable to start Tomcat with Struts

2001-02-14 Thread David Maycock

Check where the struts.jar file is placed.  I had this problem when the jar
file was placed in the tomcat\lib directory rather than the
tomcat\webapps\xx\web-inf\lib directory.  This screws up all the dynamic
class loading within tomcat.  Hope this helps

David

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: 14 February 2001 16:14
To: '[EMAIL PROTECTED]'
Subject: Unable to start Tomcat with Struts


Hi,
I am trying to install struts and am receiving the following error when
attempting to start tomcat.  Can anyone shed light on my situation?  I've
got jaxp1.0.1, and the test example for it worked properly.

Thanks,
Jessica Anderson

Starting tomcat. Check logs/tomcat.log for error messages
New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
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.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java:498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:283)
at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:178)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
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 java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:620)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLo
ader.java:464)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:401)
at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
er.java:141)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:294)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

Also, getting this error in tomcat servlet log:
Context log path="/struts-example" :tomcat.errorPage: init
Context log path="/struts-example" :jsp: init
Context log path="/struts-example" :default: init
Context log path="/struts-exam

Re: ActionForm property naming convention problem

2001-02-14 Thread Craig Tataryn


I think it's a problem with having the first letter of your property as
a small letter, I don't think it matters that the second letter is capitalized. 
Try it out and see.
FYI:
Found this somewhere a while back:
===
A PropertyDescriptor indicates not only the property, but also the
property
accessor methods (setter and getter methods). As described above, when
analyzing a bean, the Introspector first checks to see if it can get
a list of
PropertyDescriptors from the BeanInfo. If that fails, the Introspector
analyzes
the bean class, building a list of methods that match the signatures
Type getProperty() and void
setProperty(Type
value). From this list of methods, the Introspector then creates its
own
PropertyDescriptor list.
===
And then this from the bean 1.01 spec:
8.8 Capitalization of inferred names.

When we use design patterns to infer a property or event name, we need
to decide what rules
to follow for capitalizing the inferred name. If we extract the name
from the middle of a normal
mixedCase style Java name then the name will, by default, begin with
a capital letter.
Java programmers are accustomed to having normal identifiers start
with lower case letters.
Vigorous reviewer input has convinced us that we should follow this
same conventional rule
for property and event names.
Thus when we extract a property or event name from the middle of an
existing Java name, we
normally convert the first character to lower case. However to support
the occasional use of all
upper-case names, we check if the first two characters of the name
are both upper case and if
so leave it alone. So for example,
“FooBah” becomes “fooBah”
“Z” becomes “z”
“URL” becomes “URL”
We provide a method Introspector.decapitalize which implements this
conversion rule.

Craig.
[EMAIL PROTECTED] wrote:
 Yes,
you described the scenario perfectly, and much better than I did :) This
is how I understand the process as well. Using your same example, Struts
will not allow that tag  and subsequently
will not process the expected method named getNTerminal(). Instead a runtime
error will occur while processing the tag (this is all the information
I get from the WebLogic Servlet container). For things to work, I have
to rename the property as "nterminal" in the bean and update the tag as
well to . There is a problem with having
a capital letter in the 2nd position of the property name.Bob

-Original
Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February
14, 2001 10:28 AM
To: [EMAIL PROTECTED]
Subject: Re: ActionForm property
naming conventions
 
Basically (and I might be wrong) when you subsequently try access the property,
let's say with an  tag,  Struts
will do a getNTerminal() on your ActionForm.  The default is
to take the property and do the following:
1) append a "get" prefix to the property
2) change the first letter of the property to uppercase
3) call that method on the form bean.
So for instance, it's prefixing your nTerminal property and mangaling
it like so:
getNTerminal()
Like I said, I haven't looked at the code, but this is how I understand
the process.
Craig.
[EMAIL PROTECTED] wrote:
My question is best asked with an example... Why
is it that I am unable to
create a property named "nTerminal" for my ActionForm/JSP? This problem
occurs when there is an uppercase letter in the 2nd position of the
property
name. If I change the name to "nterminal" or "ntErminal" then things
work
just fine. In other words- getNterminal() is recognized by Struts,
but
getNTerminal() is invalid and results in a runtime error in the html
tag. Is
this a limitation imposed by Javabean conventions or is this a Struts
specific issue? (If you think I am crazy, then perhaps this problem
is
specific to WebLogic.)
Thanks,
Bob
--
I've been trying to change the world for years, but they just won't
give me the source code
 


--
I've been trying to change the world for years, but they just won't
give me the source code
 

begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Unable to start Tomcat with Struts

2001-02-14 Thread Anderson, Jessica

Hi,
I am trying to install struts and am receiving the following error when
attempting to start tomcat.  Can anyone shed light on my situation?  I've
got jaxp1.0.1, and the test example for it worked properly.

Thanks,
Jessica Anderson

Starting tomcat. Check logs/tomcat.log for error messages
New org.apache.struts.example.User
Begin event threw exception
java.lang.ClassNotFoundException: org.apache.struts.example.User
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
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.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at
org.apache.struts.digester.Digester.startElement(Digester.java:498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at
org.apache.struts.example.DatabaseServlet.load(DatabaseServlet.java:283)
at
org.apache.struts.example.DatabaseServlet.init(DatabaseServlet.java:178)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/servlet/http/HttpServlet
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 java.lang.ClassLoader.loadClass(ClassLoader.java:290)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:620)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadSystemClass(AdaptiveClassLo
ader.java:464)
at
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.j
ava:401)
at
org.apache.tomcat.loader.AdaptiveServletLoader.loadClass(AdaptiveServletLoad
er.java:141)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:294)
at
org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:276)
at
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartup
Interceptor.java:132)
at
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:227)
at
org.apache.tomcat.core.ContextManager.init(ContextManager.java:201)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:156)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

Also, getting this error in tomcat servlet log:
Context log path="/struts-example" :tomcat.errorPage: init
Context log path="/struts-example" :jsp: init
Context log path="/struts-example" :default: init
Context log path="/struts-example" :database: init
Context log path="/struts-example" :database: Initializing database servlet
Context log path="/struts-example" :database: Loading database from
'/WEB-INF/database.xml'
Context log path="/struts-example" :database: Database load exception



Re: Please, help with strange exception

2001-02-14 Thread Craig Tataryn


As suspected, replace: name="username" size="10"/>
with property="username" size="10"/>
The name attribute is to be used to specify the name of the bean the
property attribute applies to.  In this case, you don't have to specify
a bean name because it is within a  which will default
the name attribute to the formBean setup for the current controller.
Hope that helps,

Craig.
Michael Grushko wrote:
Hello Craig!
Thanx for answer. Here my file indexNew.jsp
Michael.
-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 6:22 PM
To: [EMAIL PROTECTED]
Subject: Re: Please, help with strange exception
Looks to me like you are using an  tag (or in your case
, because it appears that your Taglib prefix is "struts")
somewhere in your form and forgetting to have a "property" attribute
present.
Can you send us indexNew.jsp so we can see?
Craig.
Michael Grushko wrote:
> Hello everubody!
>
> I have in my test file string like this:
> #22: > type="rss.simple.LogonForm">
>
> and I get this exception (I have empty string number 23):
> org.apache.jasper.compiler.CompileException:
> E:\java\tomcat\webapps\simple\indexNew.jsp(23,1) According to the
TLD
> attribute property is mandatory for tag text
> at
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> :149)
> at
>
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:119
> )
> at
>
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
> rseEventListener.java:761)
> at
>
org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
> istener.java:138)
> at
>
org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
> tListener.java:911)
> at
>
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
> ner.java:194)
> at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:813)
> ...
>
> Help! What I do wrong?
>
> Michael Grushko.
--
I've been trying to change the world for years, but they just won't
give me
the
source code
  
  
Name: indexNew.jsp
   indexNew.jsp    Type: unspecified type
(application/octet-stream)
  
Encoding: quoted-printable

--
I've been trying to change the world for years, but they just won't
give me the source code
 

begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



RE: ActionForm property naming convention problem

2001-02-14 Thread rhayden



Yes, 
you described the scenario perfectly, and much better than I did :) This is 
how I understand the process as well. Using your same example, Struts will 
not allow that tag  and 
subsequently will not process the expected method named 
getNTerminal(). Instead a runtime error will occur while processing the tag 
(this is all the information I get from the WebLogic Servlet container). 
For things to work, I have to rename the property as "nterminal" in the 
bean and update the tag as well to . 
There is a problem with having a capital letter in the 2nd position of the 
property name.
 
Bob

  -Original Message-From: Craig Tataryn 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 14, 2001 
  10:28 AMTo: [EMAIL PROTECTED]Subject: Re: 
  ActionForm property naming conventionsBasically (and I 
  might be wrong) when you subsequently try access the property, let's say with 
  an  tag,  Struts will do a 
  getNTerminal() on your ActionForm.  The default is to take the 
  property and do the following: 
  1) append a "get" prefix to the property 2) change the first letter of 
  the property to uppercase 3) call that method on the form bean. 
  So for instance, it's prefixing your nTerminal property and mangaling it 
  like so: 
  getNTerminal() 
  Like I said, I haven't looked at the code, but this is how I understand the 
  process. 
  Craig. 
  [EMAIL PROTECTED] wrote: 
  My question is best asked with an example... Why is 
it that I am unable to create a property named "nTerminal" for my 
ActionForm/JSP? This problem occurs when there is an uppercase letter in 
the 2nd position of the property name. If I change the name to 
"nterminal" or "ntErminal" then things work just fine. In other words- 
getNterminal() is recognized by Struts, but getNTerminal() is invalid 
and results in a runtime error in the html tag. Is this a limitation 
imposed by Javabean conventions or is this a Struts specific issue? (If 
you think I am crazy, then perhaps this problem is specific to 
WebLogic.) 
Thanks, Bob
  -- I've been trying to change the world for years, but they just won't 
  give me the source code   


RE: Please, help with strange exception

2001-02-14 Thread Michael Grushko

Hello Craig!

Thanx for answer. Here my file indexNew.jsp

Michael.

-Original Message-
From: Craig Tataryn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 6:22 PM
To: [EMAIL PROTECTED]
Subject: Re: Please, help with strange exception


Looks to me like you are using an  tag (or in your case
, because it appears that your Taglib prefix is "struts")
somewhere in your form and forgetting to have a "property" attribute
present.

Can you send us indexNew.jsp so we can see?

Craig.

Michael Grushko wrote:

> Hello everubody!
>
> I have in my test file string like this:
> #22:  type="rss.simple.LogonForm">
>
> and I get this exception (I have empty string number 23):
> org.apache.jasper.compiler.CompileException:
> E:\java\tomcat\webapps\simple\indexNew.jsp(23,1) According to the TLD
> attribute property is mandatory for tag text
> at
>
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> :149)
> at
>
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:119
> )
> at
>
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
> rseEventListener.java:761)
> at
>
org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
> istener.java:138)
> at
>
org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
> tListener.java:911)
> at
>
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
> ner.java:194)
> at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:813)
> ...
>
> Help! What I do wrong?
>
> Michael Grushko.

--
I've been trying to change the world for years, but they just won't give me
the
source code


 indexNew.jsp


Re: As promised (Struts Presentation)

2001-02-14 Thread Maya Muchnik


Craig T.,
Thank you very much for your response. And I have got the answer for
my 2nd Q. from Oleg.
Maya
Craig Tataryn wrote:
Maya,
1) The language should change from the default after the user changes
his/her browser language if:


the user does a refresh in his browser (or perhaps just clicks a link to
another part of the app)


the language they have choosen is supported by the web app

When you specify the Resource file in the application init param it simply
specifies a default Resources class.  After that, if the locale changes
it tries to append the ISO language characters to the end of the class
name to see if it can find a supporting Resource file.
2) Not sure I understand the second question :(
Craig T.
Maya Muchnik wrote:
The same error is on pages 29 - 31.
After reading your document, I have two questions:
1/ Is it possible to change a language on-line. For example one user
uses English
language with his browser, then he switchs to French. Can Struts handle
this? I
think, in your document the properties file is loaded in the beginning
ActionServlet startup.
2/ How replace images with a text through properties file? (I think
this question
was posted already).
Maya
Maya Muchnik wrote:
> Craig,
> You have an error on page 28: not i8n, but i18n. I have got the explanations
on
> it.
> Maya
>
>
> > > >
> > > > The Struts presentation I did can be found (at least for the
time being)
> > > > at:
> > > > http://www.us-eh.com/craiger/articles/struts/
> > > >
--
I've been trying to change the world for years, but they just won't
give me the source code
 



Re: ActionForm property naming conventions

2001-02-14 Thread Craig Tataryn


Basically (and I might be wrong) when you subsequently try access the property,
let's say with an  tag,  Struts
will do a getNTerminal() on your ActionForm.  The default is
to take the property and do the following:
1) append a "get" prefix to the property
2) change the first letter of the property to uppercase
3) call that method on the form bean.
So for instance, it's prefixing your nTerminal property and mangaling
it like so:
getNTerminal()
Like I said, I haven't looked at the code, but this is how I understand
the process.
Craig.
[EMAIL PROTECTED] wrote:
My question is best asked with an example... Why
is it that I am unable to
create a property named "nTerminal" for my ActionForm/JSP? This problem
occurs when there is an uppercase letter in the 2nd position of the
property
name. If I change the name to "nterminal" or "ntErminal" then things
work
just fine. In other words- getNterminal() is recognized by Struts,
but
getNTerminal() is invalid and results in a runtime error in the html
tag. Is
this a limitation imposed by Javabean conventions or is this a Struts
specific issue? (If you think I am crazy, then perhaps this problem
is
specific to WebLogic.)
Thanks,
Bob

--
I've been trying to change the world for years, but they just won't
give me the source code
 

begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Re: Please, help with strange exception

2001-02-14 Thread Craig Tataryn

Looks to me like you are using an  tag (or in your case
, because it appears that your Taglib prefix is "struts")
somewhere in your form and forgetting to have a "property" attribute present.

Can you send us indexNew.jsp so we can see?

Craig.

Michael Grushko wrote:

> Hello everubody!
>
> I have in my test file string like this:
> #22:  type="rss.simple.LogonForm">
>
> and I get this exception (I have empty string number 23):
> org.apache.jasper.compiler.CompileException:
> E:\java\tomcat\webapps\simple\indexNew.jsp(23,1) According to the TLD
> attribute property is mandatory for tag text
> at
> org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
> :149)
> at
> org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:119
> )
> at
> org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
> rseEventListener.java:761)
> at
> org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
> istener.java:138)
> at
> org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
> tListener.java:911)
> at
> org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
> ner.java:194)
> at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:813)
> ...
>
> Help! What I do wrong?
>
> Michael Grushko.

--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



ActionForm property naming conventions

2001-02-14 Thread rhayden


My question is best asked with an example... Why is it that I am unable to
create a property named "nTerminal" for my ActionForm/JSP? This problem
occurs when there is an uppercase letter in the 2nd position of the property
name. If I change the name to "nterminal" or "ntErminal" then things work
just fine. In other words- getNterminal() is recognized by Struts, but
getNTerminal() is invalid and results in a runtime error in the html tag. Is
this a limitation imposed by Javabean conventions or is this a Struts
specific issue? (If you think I am crazy, then perhaps this problem is
specific to WebLogic.)

Thanks,
Bob



Please, help with strange exception

2001-02-14 Thread Michael Grushko

Hello everubody!

I have in my test file string like this:
#22: 

and I get this exception (I have empty string number 23):
org.apache.jasper.compiler.CompileException:
E:\java\tomcat\webapps\simple\indexNew.jsp(23,1) According to the TLD
attribute property is mandatory for tag text
at
org.apache.jasper.compiler.TagBeginGenerator.validate(TagBeginGenerator.java
:149)
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:119
)
at
org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspPa
rseEventListener.java:761)
at
org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventL
istener.java:138)
at
org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEven
tListener.java:911)
at
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListe
ner.java:194)
at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:813)
...

Help! What I do wrong?

Michael Grushko.




Re: Emacs and JSP

2001-02-14 Thread Michael Gerdau

>Well, I'm happy enough with Emacs in general, but I've not yet managed to
>get a nice JSP editing mode going. I've tried without success to get the
>multi-mode thing going, are there any other suggestions (I develop on Linux
>- the Java based editors are still a bit slow for me on Linux)?

Have you tried the html-helper-mode ? It comes with JSP (and ASP, PHP).
Especially the latest release had some problems that weren't there in
older versions but such is life in the free world.

The URL is http://www.gest.unipd.it/~saint/hth.html

HTH,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau   email: [EMAIL PROTECTED]
 People who live in glass houses, don't need WINDOWS!
 PGP-keys available on request or at public keyserver





AW: ReRe: If property !=null tag?

2001-02-14 Thread Laufer, Michael
Title: If property !=null tag?



Me 
either ...

  -Ursprüngliche 
  Nachricht-Von: "Gössel, Stefan" 
  [mailto:[EMAIL PROTECTED]]Gesendet am: Mittwoch, 14. 
  Februar 2001 15:49An: 
  '[EMAIL PROTECTED]'Betreff: ReRe: If property !=null 
  tag?
  Hi,
  I 
  use the logic:present and the logic:notPresent tag in Struts 0.5 and it works 
  fine now.
   
  
-Ursprüngliche 
Nachricht-Von: Chris Evans 
[mailto:[EMAIL PROTECTED]]Gesendet am: Mittwoch, 14. 
Februar 2001 14:17An: 
[EMAIL PROTECTED]Betreff: Re: If property !=null 
tag?
Hi,
I used the  tag like 
this:
 
    
property="orderLI"    
value="" >
 
It seems to work fine.  The property 
orderLI is an array which if there is no value in it returns null to the 
JSP.  I don't think this tag is documented for some reason.  I'm 
using struts version 0.5.  If there is a better way I'd like to hear 
about it!
 
Chris Evans
Canlink Interactive Technologies
 

  - Original Message - 
  From: 
  Gössel, Stefan 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, February 14, 2001 
  6:30 AM
  Subject: If property !=null 
tag?
  
  Hi, 
  i want a part of my JSP code to be ignored, if 
  a property in my Actionbean is null. Any idea for this in struts without too much JSP code ? 
  Thanks in advance, 
  Stefan 



ReRe: If property !=null tag?

2001-02-14 Thread "Gössel, Stefan"
Title: If property !=null tag?



Hi,
I use 
the logic:present and the logic:notPresent tag in Struts 0.5 and it works fine 
now.
 

  -Ursprüngliche 
  Nachricht-Von: Chris Evans 
  [mailto:[EMAIL PROTECTED]]Gesendet am: Mittwoch, 14. Februar 
  2001 14:17An: [EMAIL PROTECTED]Betreff: Re: 
  If property !=null tag?
  Hi,
  I used the  tag like 
  this:
   
      
  property="orderLI"    
  value="" >
   
  It seems to work fine.  The property orderLI 
  is an array which if there is no value in it returns null to the JSP.  I 
  don't think this tag is documented for some reason.  I'm using struts 
  version 0.5.  If there is a better way I'd like to hear about 
  it!
   
  Chris Evans
  Canlink Interactive Technologies
   
  
- Original Message - 
From: 
Gössel, Stefan 
To: '[EMAIL PROTECTED]' 

Sent: Wednesday, February 14, 2001 6:30 
AM
Subject: If property !=null tag?

Hi, 
i want a part of my JSP code to be ignored, if a 
property in my Actionbean is null. Any 
idea for this in struts without too much JSP code ? 
Thanks in advance, 
Stefan 



Re: Components tutorial problem

2001-02-14 Thread Cedric dumoulin



Maya Muchnik wrote:

> Victor,
>
> Could you, please, email where the Components tutorial is.

  Components tutorial try to explain basic about Components.
  It can be found on Component web site :
   (main)   http://www.lifl.fr/~dumoulin/components
   (mirror) http://www.geocities.com/cedricdumoulin/components

  Components can be seen as extended Template.

 Cedric





Re: As promised (Struts Presentation)

2001-02-14 Thread Craig Tataryn


Maya,
1) The language should change from the default after the user changes
his/her browser language if:


the user does a refresh in his browser (or perhaps just clicks a link to
another part of the app)


the language they have choosen is supported by the web app

When you specify the Resource file in the application init param it simply
specifies a default Resources class.  After that, if the locale changes
it tries to append the ISO language characters to the end of the class
name to see if it can find a supporting Resource file.
2) Not sure I understand the second question :(
Craig T.
Maya Muchnik wrote:
The same error is on pages 29 - 31.
After reading your document, I have two questions:
1/ Is it possible to change a language on-line. For example one user
uses English
language with his browser, then he switchs to French. Can Struts handle
this? I
think, in your document the properties file is loaded in the beginning
ActionServlet startup.
2/ How replace images with a text through properties file? (I think
this question
was posted already).
Maya
Maya Muchnik wrote:
> Craig,
> You have an error on page 28: not i8n, but i18n. I have got the explanations
on
> it.
> Maya
>
>
> > > >
> > > > The Struts presentation I did can be found (at least for the
time being)
> > > > at:
> > > > http://www.us-eh.com/craiger/articles/struts/
> > > >

--
I've been trying to change the world for years, but they just won't
give me the source code
 

begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Re: As promised (Struts Presentation)

2001-02-14 Thread Craig Tataryn

Check. Updated i8n to i18n.

Thanks,

Craig.

Maya Muchnik wrote:

> Craig,
> You have an error on page 28: not i8n, but i18n. I have got the explanations on
> it.
> Maya
>
> Craig Tataryn wrote:
>
> > Ar, Dark Angel
> >
> > Ted, I'll cut the "only" word out of there tonight after I watch the
> > aforementioned program.  But as far as I know, ActionForm is the only Model
> > type class that Struts really manages for you auto-magically.
> >
> > Craig.
> >
> > Ted Husted wrote:
> >
> > > Kewl!
> > >
> > > I think I know what I'll be doning after Dark Angel tonight!
> > >
> > > I did notice one point on page 17, where it says "Struts will only
> > > handle models in an automatic fashion if you extended
> > > org.apache.struts.action.ActionForm"
> > >
> > > Is the word "only" accurate?
> > >
> > > I believe Struts works best if the form beans are ActionForm subclasses,
> > > but I think the form and action would work just fine with any JavaBean.
> > >
> > > -Ted.
> > >
> > > Craig Tataryn wrote:
> > > >
> > > > 
> > > > Craig M.: Can you add the link to the presentation (if you deem it
> > > > suitable) to the resources section of the Struts User Guide?
> > > > 
> > > >
> > > > URL forwarding sucks.  Given that, I will have to give you the link to
> > > > the presentation as it exists on the server space I am borrowing until I
> > > > get my own server box.  The URL may change in the future to my
> > > > computer-programmer.org domain.
> > > >
> > > > The Struts presentation I did can be found (at least for the time being)
> > > > at:
> > > > http://www.us-eh.com/craiger/articles/struts/
> > > >
> > > > Let me know of any problems or suggestions you may have about the
> > > > presentation!
> > > >
> > > > Thanks,
> > > >
> > > > Craig.
> > > >
> > > > --
> > > > I've been trying to change the world for years, but they just won't give
> > > > me the source code
> >
> > --
> > I've been trying to change the world for years, but they just won't give me
> > the source code

--
I've been trying to change the world for years, but they just won't give me the
source code



begin:vcard 
n:Tataryn;Craig
tel;home:952-884-6752
tel;work:952-842-5576
x-mozilla-html:TRUE
url:http://www.computer-programmer.org
org:Compuware;Professional Division
adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Staff Analyst
fn:Craig Tataryn
end:vcard



Re: Components tutorial problem

2001-02-14 Thread Cedric dumoulin


  See intermixing.

 Cedric

"Fickes, Vic" wrote:

> I am trying to get the Components tutorial to run and am having a problem.
> I'm using WebLogic5.1SP8 with the additional fixes from Matthias Kerkoff
> (many thanks).  The Struts example runs fine and most (but not all) of the
> Jakarta taglibs examples run fine, so I think I finally have my environment
> set up correctly.
>
> When I run the Components tutorial, I get this error:
>
> Tue Feb 13 18:17:42 EST 2001: 
> resolving taglib uri '/WEB-INF/components.tld' to taglib-location
> /WEB-INF/components.tld:
> Tue Feb 13 18:17:43 EST 2001: 
> resolving taglib uri '/WEB-INF/struts-logic.tld' to taglib-location
> /WEB-INF/struts-logic.tld:
> [Exception in:/common/menuViewSrc.jsp] (line -1): Error in tag library at:
> 'logic': The Tag class 'org.apache.struts.taglib.logic.EqualTag' has no
> setter method  corresponding to TLD declared attribute 'scope', (JSP 1.1
> spec, 5.4.1)
> weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
> 'logic': The Tag class 'org.apache.struts.taglib.logic.EqualTag' has no
> setter method  corresponding to TLD declared attribute 'scope', (JSP 1.1
> spec, 5.4.1)
>
> This would appear to be an error in the Struts logic tag implementation (for
> whatever version of Struts was used in the tutorial app).  Is this correct,
> or am I doing something else wrong?

  It is correct, it seem to come from the struts logic tag that don't run on WL
5.
  I have recompile Components distribution with Struts 2214, and all seem to
work.
  You can test Components tags lib by invoking comps-doc/test/testAll.jsp. If
this page looks correct, components must run correctly.
  If Components latest distribution contains an older version of Struts, you can
take the latest Struts version
  and replace struts.jar and struts-*.tld file in Compoenents example and
tutorial.

>
>
> Also, are there any test applications available for the Struts Framework
> beans, similar to the ones that come with the Jakarta taglibs?  If there are
> I haven't run into them yet.

Struts comes with 'struts-test.war', Have you check it ?

>
>
> Thanks,
> ===
> Victor Fickes   mailto:[EMAIL PROTECTED]
> Northrop Grumman PRB Systems   www.prb.net
> 43865 Airport View Drive301-373-2388 x106 (voice mail)
> Hollywood, MD 20636 301-373-2360 (receptionist)
> ===




Re: Old questions that die hard

2001-02-14 Thread Maya Muchnik

Thank you, David.
I have tested struts-example with disabled JavaScript on Netscape. It is still
working!!!
Maya

"Verratti, David" wrote:

> Hi Maya:
>
> In Netscape 4.7: Choose Edit-->Preferences-->Advanced, unselect enable
> Javascript
>
> Don't think you can in IE, means you can rely on Javascript if you know your
> users are all IE..
>
> see ya
> Dave
>
> -Original Message-
> From: mmuchnik [mailto:mmuchnik]On Behalf Of Maya Muchnik
> Sent: 13 February 2001 22:13
> To: [EMAIL PROTECTED]
> Subject: Re: Old questions that die hard
>
> David,
>
> Could you, please, email, how to disable JavaScript in Netscape and / or IE.
>
> thanks,
>
> Maya
>
> "Verratti, David" wrote:
>
> > Basic rule - don't count on client for anything other than basic html
> unless
> > you can control the client environment.  It's not just ancient browser
> > support, fairly modern browsers (ie Netscape, which I assume would be the
> > default browser for all non-Windows clients) allow users to disable
> > Javascript.
> >
> > see ya
> > Dave
> >
> > -Original Message-
> > From: Andrew Collins [mailto:[EMAIL PROTECTED]]
> > Sent: 13 February 2001 20:18
> > To: [EMAIL PROTECTED]
> > Subject: Re: Old questions that die hard
> >
> > > Of course, late-model Javascript also supports regex ...
> >
> > Perhaps you mean "newer versions of JavaScript"...
> >
> > (I'm a stickler sometimes, a weissenheimer the remainder.)
> >
> > Is there good cause to support ancient browsers?
> >
> > __
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail - only $35
> > a year!  http://personal.mail.yahoo.com/




Re: Starter kit

2001-02-14 Thread Maya Muchnik



Get (download) and install each component-project (Ant, Apache, Tomcat,
Struts) separately. Read INSTALLATION and README files in each project.
A lot on-line documentation.
T Gore wrote:

What
all do I need to download to have Web Server (Apache) a servlet / JSP reference
implementation downloaded (Tomcat) and Struts. Thanks,TG





Re: If property !=null tag?

2001-02-14 Thread Chris Evans
Title: If property !=null tag?



Hi,
I used the  tag like 
this:
 
    
property="orderLI"    
value="" >
 
It seems to work fine.  The property orderLI 
is an array which if there is no value in it returns null to the JSP.  I 
don't think this tag is documented for some reason.  I'm using struts 
version 0.5.  If there is a better way I'd like to hear about 
it!
 
Chris Evans
Canlink Interactive Technologies
 

  - Original Message - 
  From: 
  Gössel, Stefan 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, February 14, 2001 6:30 
  AM
  Subject: If property !=null tag?
  
  Hi, 
  i want a part of my JSP code to be ignored, if a 
  property in my Actionbean is null. Any idea 
  for this in struts without too much JSP code ? 
  Thanks in advance, 
  Stefan 


File UpLoad

2001-02-14 Thread Byomakesh Parida

Hi,
 i am facing the problem when i used to upload the files. when i am passing
the parameter to the form (enctype="multipart/form-data", it gives the error
like

500 Internal Server Error
/mediaman/saveIconFileUpLoadAction.do:

javax.servlet.ServletException: BeanUtils.populate
java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:82
4)
at
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:75
5)
at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:781)
at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:563)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:333)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:18
05)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1416)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:481)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
at allaire.jrun.WorkerThread.run(WorkerThread.java:74)

where as i hava used the populate method properly.
can anybody help me in this case.

cheers
Byomakesh





Re[2]: As promised (Struts Presentation)

2001-02-14 Thread Oleg V Alexeev

Hello Maya,

Wednesday, February 14, 2001, 3:12:04 PM, you wrote:

MM> Oleg,
MM> Thank you very much for very detail, helpful answer.
MM> The best wishes and good luck.
MM> Maya

Always welcome. 8)

>>   You can store image file names in properties in use it in  tags
>>   - 
>>   
>>

Recently I fix  tag and post it to the struts-dev. If Craig
apply it then you can avoid such constructions as -
 
and use  tag -
 

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Properties

2001-02-14 Thread nic.hobbs



Memo from Nic Hobbs of PricewaterhouseCoopers

 Start of message text 

Hi Sebastian,

I have a rough and ready ResourceBundle working against a database using a JNDI
provided connection pool. This works under Weblogic 6 but haven't tested it
anywhere else, and it is not production quality (most exceptions are just
ignored and the config parameter format is not exactly well thought out!), but
it should give you an idea of what needs to be done! The comments in the files
should get you started. Good luck!

HTH

Nic

(See attached file: DatabaseMessageResources.java)(See attached file:
DatabaseMessageResourcesFactory.java)







Sebastien Cesbron <[EMAIL PROTECTED]> on 14/02/2001 09:54:05

Please respond to [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
cc:


Subject:  Properties



Hi,

Does anybody have an experience of properties that are not in the
name=value format (xml format for example). It seems that I need to
create a new subclass of ResourceBundle (like PropertyResourceBundle)
but is it an easy task ? Do you know any example of such a thing ?

Thanks

Sebastien Cesbron

__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif




- End of message text 

The principal place of business of PricewaterhouseCoopers and its associate
partnerships is 1 Embankment Place, London WC2N 6NN where lists of the
partners' names are available for inspection. All partners in the associate
partnerships are authorised to conduct business as agents of, and all
contracts for services to clients are with, PricewaterhouseCoopers. The UK
firm of PricewaterhouseCoopers is authorised by the Institute of Chartered
Accountants in England and Wales to carry on investment business.
PricewaterhouseCoopers is a member of the world-wide
PricewaterhouseCoopers organisation.

The information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material.  Any
review, retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than the
intended recipient is prohibited.   If you received this in error, please
contact the sender and delete the material from any computer.

 DatabaseMessageResources.java
 DatabaseMessageResourcesFactory.java


Re: As promised (Struts Presentation)

2001-02-14 Thread Maya Muchnik

Oleg,
Thank you very much for very detail, helpful answer.
The best wishes and good luck.
Maya

Oleg V Alexeev wrote:

> Hello Maya,
>
> Wednesday, February 14, 2001, 2:56:18 AM, you wrote:
>
> MM> 1/ Is it possible to change a language on-line. For example one user uses English
> MM> language with his browser, then he switchs to French. Can Struts handle this? I
> MM> think, in your document the properties file is loaded in the beginning
> MM> ActionServlet startup.
>
> JVM load all files in properties bundle at once and all this
> resources can be used in run time. Example of switching to another
> locale -
>
> public class ChangeLanguageAction extends Action {
>
> public ActionForward perform(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException {
> String country = ((ChangeLanguageForm) form).getCountry();
> String language = ((ChangeLanguageForm) form).getLanguage();
> String source = ((ChangeLanguageForm) form).getSource();
> HttpSession session = request.getSession();
> ActionForward forward = null;
>
> setLocale( request, new Locale( language, country ) );
>
> if( source==null )
>  forward = (mapping.findForward("success"));
> else {
>  forward = new RedirectingActionForward();
>  forward.setPath( source );
> }
>
> return forward;
> }
>
> }
>
> MM> 2/ How replace images with a text through properties file? (I think this question
> MM> was posted already).
>
>   You can store image file names in properties in use it in  tags
>   - 
>   
>
>   May be I not understand your 2/ question... Explane please, if so.
>
> --
> Best regards,
>  Olegmailto:[EMAIL PROTECTED]




Loosing error-object when using frame

2001-02-14 Thread Frank . Hossfeld

Hi,

We are creating a web-application using Struts and JSPs. Everytime it is
necessary, we use Struts. When we will make a new frameset, we work without
Struts. Everything works fine accept the following situation:

In one frame there is a form. The target of the form, if it is submitted, is
the parent frame. If there is an error I will show the same form (site) in
the current frame (_self) again.

But  I have found one problem. I told Struts in the case of error to load
the JSP with the frameset again. This works fine, but the error-object gets
lost. Of course, because the scope is request. 

Somebody an idea how to solve this problem 

cu Frank Hossfeld



AW: Avoid JSP caching by the browser

2001-02-14 Thread Lind Jürgen


> -Ursprungliche Nachricht-
> Von:  Lind Jurgen [SMTP:[EMAIL PROTECTED]]
> Gesendet am:  Mittwoch, 14. Februar 2001 11:18
> An:   [EMAIL PROTECTED]
> Betreff:  Avoid JSP caching by the browser
> 
> Hi there,
> 
> I have the following problem: in order to prevent the web-browser 
> from using cached versions of a jsp, we plan to add some unique 
> timestamp (which will actually be ignored by the jsp) to the url 
> that calls the jsp, e.g.:
> 
> myjsp
> 
> While this works fine when cookies are enabled, it fails when 
> cookies are disabled because it does not make use of the URL
> rewriting capabilities of the Struts taglib.
> 
> Using the html:link tag, however, introduces the difficulty how to 
> dynamically add the timestamp. Using something like
> 
> myjsp
> 
> fails as the Java Code will not get interpreted but it will 
> be literally 
> appended  to the URL, causing a Decode Error in the receiving JSP.
> 
> Has anyone experienced similar problems (with the web browser caching 
> jsp pages) and could offer some help or are there any 
> suggestions wrt. 
> the above evaluation problem?
> 
> []  Hi,
> 
> i have not tried all the attributes of the tag "link" in 
> struts-html.tld. But a simple workaround
> could be 
> myjsp 
> (or not?)
> 
> Dimitris
> 

no, because then I run into the same problem as before as soon as
cookies are disabled..

regards

Jürgen



RE: If property !=null tag?

2001-02-14 Thread Brian Bowman
Title: If property !=null tag?









If you are
using Struts 1.0, have you tried?

 



    Shown
only when yourProp is not null



 

-Original
Message-
From: Gössel, Stefan
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001
12:31 PM
To:
'[EMAIL PROTECTED]'
Subject: If property !=null tag?

 

Hi, 

i want a part of my JSP
code to be ignored, if a property in my Actionbean is null. 
Any idea for this in struts without too much JSP
code ? 

Thanks in advance, 

Stefan 








If property !=null tag?

2001-02-14 Thread "Gössel, Stefan"
Title: If property !=null tag?





Hi,


i want a part of my JSP code to be ignored, if a property in my Actionbean is null. 
Any idea for this in struts without too much JSP code ?


Thanks in advance,


Stefan





setting docBase in JBuilder to run/debug

2001-02-14 Thread michael . brohl




Hello,

it's only slightly related to STruts, but I like to get your suggestions to the
following problem:

I use JBuilder 4 Enterprise Trial with Tomcat 3.2 and Struts. If I want to run
the application,
the Tomcat docBase is always set to D:\ instead of D:\TOMCAT.

I provided the correct path to the JVM via the -D.. parameter.
The project properties are set correctly

Here's the related output from JBuilder:



Setting home to D:\
Starting tomcat. Check logs/tomcat.log for error messages

Context log: path="" Adding context path=""  docBase="D:\"
Context log: path="/vip-gallery" Adding context path="/vip-gallery"
docBase="D:\"
Starting tomcat install="d:\tomcat\" home="D:\"
classPath="C:\Programme\JBuilder4\tomcat\lib\webserver.jar;C:\Programme\JBuilder4\tomcat\lib\jasper.jar;C:\Programme\JBuilder4\tomcat\lib\xml.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\Oracle\JDeveloper

3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\webserverglue.jar;D:\tomcat\webapps\vip-gallery\WEB-INF\classes;C:\Programme\Oracle\JDeveloper

3.2\myclasses\struts.jar;C:\Programme\JBuilder4\lib\servlet.jar;D:\tomcat\vipshop\classes;C:\Programme\JBuilder4\lib\jbuilder.jar;C:\Programme\JBuilder4\lib\help.jar;C:\Programme\JBuilder4\lib\gnuregexp.jar;C:\Programme\JBuilder4\jdk1.3\demo\jfc\Java2D\Java2Demo.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\i18n.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\jaws.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\rt.jar;C:\Programme\JBuilder4\jdk1.3\jre\lib\sunrsasign.jar;C:\Programme\JBuilder4\jdk1.3\lib\dt.jar;C:\Programme\JBuilder4\jdk1.3\lib\tools.jar;C:\Programme\Oracle\JDeveloper

3.2\java1.2;
C:\Programme\Oracle\JDeveloper 3.2\java1.2\jre;C:\Programme\Oracle\JDeveloper
3.2\java1.2\lib"
JSP Servlet Started
...




Do you have a suggestion how to set the docBase correctly?

Regards

Michael







AW: Avoid JSP caching by the browser

2001-02-14 Thread D. Veniseleas



-Ursprungliche Nachricht-
Von:Lind Jurgen [SMTP:[EMAIL PROTECTED]]
Gesendet am:Mittwoch, 14. Februar 2001 11:18
An: [EMAIL PROTECTED]
Betreff:Avoid JSP caching by the browser

Hi there,

I have the following problem: in order to prevent the web-browser 
from using cached versions of a jsp, we plan to add some unique 
timestamp (which will actually be ignored by the jsp) to the url 
that calls the jsp, e.g.:

myjsp

While this works fine when cookies are enabled, it fails when 
cookies are disabled because it does not make use of the URL
rewriting capabilities of the Struts taglib.

Using the html:link tag, however, introduces the difficulty how to 
dynamically add the timestamp. Using something like

myjsp

fails as the Java Code will not get interpreted but it will be literally 
appended  to the URL, causing a Decode Error in the receiving JSP.

Has anyone experienced similar problems (with the web browser caching 
jsp pages) and could offer some help or are there any suggestions wrt. 
the above evaluation problem?

[]  Hi,

i have not tried all the attributes of the tag "link" in struts-html.tld. But a simple 
workaround
could be 
myjsp 
(or not?)

Dimitris




Properties

2001-02-14 Thread Sebastien Cesbron

Hi,

Does anybody have an experience of properties that are not in the
name=value format (xml format for example). It seems that I need to
create a new subclass of ResourceBundle (like PropertyResourceBundle)
but is it an easy task ? Do you know any example of such a thing ?

Thanks

Sebastien Cesbron
 
__
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif





  1   2   >