RE: BODY onLoad Workaround

2004-03-02 Thread russo
You cannot have an empty alert. At least under Firefox browser:

That is:

This works:


THe doc body.



But this doesn't:


THe doc body.



You can also try validating your page:
http://validator.w3.org/
You may have some bad HTML
-R^3

On Tue, 2 Mar 2004, Alan Weissman wrote:

> Ok something incredibly strange is afoot:
>
> If I do a view source and save the source code, then load the page from
> the file system, the alert() works.
>
> If I use IE to save the page and then load the page from the file
> system, I do not get a full page saved, and though the alert() is in the
> body tag, it is not called.
>
> I have never run into anything like this before.  Though I'm starting to
> think this might not be a Struts/Tiles thing.
>
> Any thoughts?
>
> Thanks so much,
> Alan
>
> -Original Message-
> From: Alan Weissman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
>
> Hey Mark, could you explain what you mean?  I've tried shutting down
> Tomcat and restarting, which shouldn't make a difference.  I can also
> verify that  onload="alert()" is part of the page by doing a view
> source.
>
> Thanks,
> Alan
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> I guess its possible that the layout isn't getting reloaded with the
> tiles request.
>
> an iframe or an image will do as a quick hack.
>
> 
>
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
>
> > Thanks Richard for your input.  Can you let me know where you see
> > people
> > using it?  I have an onLoad="alert('body onload')" on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that I am not alone in
> > this
> > problem.  I am however, not able to find where to download the tag
> > library the page refers to.
> >
> > http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -Original Message-
> > From: Richard Yee [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser? Have
> > you tried using Netscape and looking at the JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <[EMAIL PROTECTED]> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >> So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for faster
> > http://search.yahoo.com
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

|--|
| Ryan Russo   |
| [EMAIL PROTECTED]|
| University at Albany--Computing  |
| <>|
| Technical Services Web Team  |
|__|

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



Re: Bug in Validator javascript, not showing all errors?

2004-02-25 Thread russo
Mike:
I see what you're saying now.

It's only showing all the errors of the same type at any one time
dependending on the order the Validator functions are called.

Sorry for the confusion.
-Ryan ( <---darn newbies )

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



Re: Bug in Validator javascript, not showing all errors?

2004-02-25 Thread russo
Sorry:
 I missed the declarations at the top of my index.jsp
The following precedes the  tag:

<%@ page session="false" %>
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>


-Ryan

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



Re: Bug in Validator javascript, not showing all errors?

2004-02-25 Thread russo
Hi Mike:

> Thank you. And if I understand correctly, this feature is not available
> in the latest release build, v1.1. I guess I have to wait until v1.2
> comes out?
>
I'm using stable release of Struts 1.1

I assume you changed your calls to specific Validator functions to the
wrapper function built by Validator and named the way I specified?

To the best of my limited knowledge you shouldn't be calling the
individual Validator functions. Unless you're doing something special?

See my complete index.jsp below sig

In my app I have:
 LoginForm.java (extends ValidatorForm)

If that's not helping give me an idea of where you're still having problems.
-Ryan

File = index.jsp:










  

  ">
  
User Name

  


  
  
Password

  

  
  
 

  

  

  



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



Re: Bug in Validator javascript, not showing all errors?

2004-02-25 Thread russo


File = struts-config.xml >> Validator plugin elements:
  


  

File = login.jsp >> form declaration:
...

...

Where [BLAH] is the name of the action which handles your form submition.

I'm a newbie, so if there's a better way fire away people.
-Ryan

On Wed, 25 Feb 2004, Mike Millson wrote:

> I have a form with 1 text field and 1 password field:
> username: required and maxlength 10
> password: required
>
> The return statement for the validateLoginForm function generated in the
> dynamic javascript:
>
> return validateMaxLength(form) && validateRequired(form);
>
> If I enter a username that is too long, validateMaxLength returns false, so 
> validateRequired is never evaluated. The result is that only the error about 
> username being too long is displayed, even if password is empty.
>
> This is not how it works on the server side. If I disable javascript and submit, the 
> server side displays both errors: username too long and password required.
>
> Is this a bug? Why aren't the client side and server side validation
> results equal?
>
> Thank you,
> Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

|--|
| Ryan Russo   |
| [EMAIL PROTECTED]|
| University at Albany--Computing  |
| <>|
| Technical Services Web Team  |
|__|

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



Re: Setting nocache

2004-02-12 Thread russo
Hubert:
 Thanks for the info.  Based on my attempts, and speaking from a position
of ignorance I believe I am unable to use transaction tokens from my
initial login. I believe it's due to the way I set up entry into the web
app. ??

http:/// --forward> index.jsp (submit to loginAction)
 failure --^
 success--> .interface.tile

That is, I have no initial action (breaks MVC2?).
Consequently, the index.jsp page where my login form resides is being
presented prior to any action where I could use saveToken().  ??

I assume this is also why the redirect="true" on the forward does not
prevent a re-POST?

In any case, I'm satisfied with what I have for the login portion. I chose
to use the fact that I store a user object in the session for
authenticated/authorized users. Re-POSTs to my login action for users
already logged in are just ignored now.

However, I can see how the transactions tokens will come in handy for the
remainder of my app. :)

Thanks to all who answered,
-Ryan

> Take a look at Struts transaction tokens.  That will help provide your Action
> with a flag to ignore successive transactions (in this case, logins), even
> when the user hits "ok" on the resend prompt.
> If you don't want the user to even see the resend prompt, you can redirect to
> the view after the transaction.  Even with a redirect, though, you might
> still want to add the transaction token checking.
>
>  - Hubert
>
> --- [EMAIL PROTECTED] wrote:
> > Hi Jay:
> >  Thanks for the response. That didn't have the intended result but, it
> > appears to be working when I look at the headers.
> >  Maybe my goal's not clear?
> >  Outline of steps in my web app. and where I want to prevent repost as
> > follows:
> > 1) http://:/afadmin/
> >   presents login form
> >
> > 2) On successful login user info is stored in session and user is
> > forwarded to view:
> > http://:/afadmin/console.afr
> > At the moment this is just simple page with a header, menu, body and
> > footer.
> >
> >  If you hit the refresh at this view the browser still has the post data
> > from the login view and if I click "OK" it re-sends the login information.
> >
> > Is there a way to prevent the repost on the client end? Or, at least
> > indicate to the client that I'd like it to forget about the post
> > information from the previous view?
> > Or, am I approaching this incorrectly? Should I just ignore the re-post in
> > my loginAction ?
> >   I found this but, in my present state of mind (too darned tired) it
> > seems like overkill:
> >  http://www.livinglogic.de/Struts/
> >
> > Thanks,
> > -Ryan
> >
> > > In your struts-config.xml  element, thus:
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > Jay
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> __
> Do you Yahoo!?
> Yahoo! Finance: Get your refund fast by filing online.
> http://taxes.yahoo.com/filing.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

|--|
| Ryan Russo   |
| [EMAIL PROTECTED]|
| University at Albany--Computing  |
| <>|
| Technical Services Web Team  |
|__|

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



Re: Tiles

2004-02-10 Thread russo
Samy:
 I found this helpful:
http://www.theserverside.com/articles/article.jsp?l=Tiles101

-Ryan
On Tue, 10 Feb 2004, Samyukta Akunuru wrote:

> Any comments on Tiles.samples available?
> I am starting to design the laout of my pages to make them easy
>
> -Samy
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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



Re: Setting nocache

2004-02-09 Thread russo
Hi Jay:
 Thanks for the response. That didn't have the intended result but, it
appears to be working when I look at the headers.
 Maybe my goal's not clear?
 Outline of steps in my web app. and where I want to prevent repost as
follows:
1) http://:/afadmin/
  presents login form

2) On successful login user info is stored in session and user is
forwarded to view:
http://:/afadmin/console.afr
At the moment this is just simple page with a header, menu, body and
footer.

 If you hit the refresh at this view the browser still has the post data
from the login view and if I click "OK" it re-sends the login information.

Is there a way to prevent the repost on the client end? Or, at least
indicate to the client that I'd like it to forget about the post
information from the previous view?
Or, am I approaching this incorrectly? Should I just ignore the re-post in
my loginAction ?
  I found this but, in my present state of mind (too darned tired) it
seems like overkill:
 http://www.livinglogic.de/Struts/

Thanks,
-Ryan

> In your struts-config.xml  element, thus:
>
> 
>
> 
>
> 
>
> Jay

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



Setting nocache

2004-02-09 Thread russo
Hi All:
 Question: Where/How do I set up my Struts app. so that all forms (views)
   send out  "nocache" pragma?
 Goal: Attempt to prevent repost of form data on browser refresh.
 Status: Struts newbie
 Developing Env.: JDeveloper 10G (OC4J Servlet Engine), Struts 1.1
 Deployment Env.: Tomcat 5.0.16, Struts 1.1
 Browser: Moz. Firebird
 In response to why I didn't search the archive: It produces the following
 error:
ht://Dig error
htsearch detected an error. Please report this to the webmaster of this
site. The error message is:
Unable to read configuration file
 In reponse to why I didn't use Google: I have been for well over 4 hours.
 Google conclusions: setting nocache in web.xml is deprecated. I should
 set my controller to nocache=true
  my controller in struts-config.xml now looks like:


 Where my class "AuthRequestProcessor" extends TilesRequestProcessor.

 This had no apparent affect. Hitting refresh in Firebird results in a
warning that I'm about to re-POST my form data.

 In response to why I don't read a book:  I did. It said to use web.xml.
Guess I need a new book.

I hope you have found this plea for help both informative and amusing.

Peace,
|------|
| Ryan Russo   |
| [EMAIL PROTECTED]|
| University at Albany--Computing  |
| <>|
| Technical Services Web Team  |
|__|

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



RE: Looking for junior Java/Struts developers

2004-02-04 Thread russo
Jiin-Her hits the nail on the head
 I certainly wouldn't want to make 50K while living in Boston or New York
City...
Here's the cost of living for Herndon VA
http://realestate.yahoo.com/re/neighborhood/search.html?sa=&c=Herndon&s=VA&z=

Cost of living (taxes, expenses, insurance, etc...) can change from town
to town even. As the add says you need to move to Herndon VA to live on
that 50K. ;)

-R^3

On Wed, 4 Feb 2004, Jiin-Her Lu wrote:

> Depends on when, where, and what is your citizenship. It can be up to $ 85000+  in 
> US.
>
> Jiin-Her Lu
> (816) 926-2145
>

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



Re: (resend) Validator JavaScript displaying? Mozilla bug?

2004-01-16 Thread russo
Ok, I lied. I neglected to check the local copy of your page prior to
making the edit. Bad on me.

In sum, visiting the page in Firebird 0.7 displays the script as stated.
Saving the page as a local file then opening and the page seems to behave
as expected. ??

-Ryan

> Doesn't look like the script is commented properly.
>  I changed:
> 
> and it rendered properly in Firebird .7
>
> Did you add "Begin" or did Validator?
>
> Curious, because I'm a Struts newbie and plan on using Validator soon.
>
> Regards,
> -Ryan
>
> > Hi folks,
> >
> > I am having a problem with Mozilla, Netscape, and FireBird browsers on
> > pages that use
> > the validator JavaScript.  It seems that the browsers "choke" on all that
> > script and end up displaying the script instead of the page content (
> > even though the script is guarded by the HTML comments) about 80% of the
> > time.
> >
> > Please see:
> > http://www.bulliondirect.com/catalog/showProducts.do?category=1
> >
> >
> > When I have a garbled page, I look at the page source, and the source looks
> > fine.
> > The page validates as HTML 4.01 Transitional compliant via:
> > http://validator.w3.org/file-upload.html
> > http://validator.w3.org/detailed.html
> >
> > The only way I can get it to display correctly, is to keep hitting reload
> > until it renders correctly, but the page source is always the same by file
> > comparison.
> > If you File->Save a garbled page, and load it from file, it renders correctly.
> >
> > IE does not have this problem, and I cannot find any evidence that any one else
> > has ever experienced this either.  What makes our pages a special case?
> > I know all the affected browsers are related in some way, do they share
> > some sort
> > of common bug (In Gecko I presume)?
> >
> > Can anyone confirm they see what I see?  Anyone have a similar experience?
> >
> > BugZilla (http://bugzilla.mozilla.org/) is rather difficult for me to use,
> > so I
> > haven't been able to use it well enough to find reports of this.
> >
> > Tested Browsers:
> > Mozilla 1.5 Gecko/20030916
> > FireBird 0.7 Gecko/20031007
> > Netscape 7.1 Gecko/20030624
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

|--|
| Ryan Russo   |
| [EMAIL PROTECTED]|
| University at Albany--Computing  |
| <>|
| Technical Services Web Team  |
|__|

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



Re: (resend) Validator JavaScript displaying? Mozilla bug?

2004-01-16 Thread russo
Doesn't look like the script is commented properly.
 I changed:

Re: Migrating from 1.0.2 to 1.1

2002-11-25 Thread Francesco Russo
Thanks David,

but this does not address what I was looking for. I need a way to get a 
reference to an already instantiated Action among the ones instantiated 
by the ActionServlet.
Is there a way to accomplish this task with the 1.1 version? At the 
bottom of the mail still appears the code fragment I use with Struts 
1.0.2 to help in understanding what my goal is.

Thanks,
Francesco.

David Graham wrote:

If the ActionServlet has instantiated an Action then it has already 
been loaded by the class loader and won't be loaded again by your 
servlet.  I suggest removing that piece of code entirely.

David






From: Francesco Russo <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Migrating from 1.0.2 to 1.1
Date: Mon, 25 Nov 2002 17:13:42 +0100

Hi everybody,

I have a question concerning how to move a piece of code working with 
the Struts 1.0.2  release to the upcoming 1.1 stable one. What I do is:

public myActionServlet extends ActionServlet
{
   ...
   public Class getClass(String fullyQualifiedName)
   {
 FastHashMap fhm = this.actions;
 java.lang.Object obj = fhm.get( fullyQualifiedName );
 return obj.getClass();
   }
   ...
}

My intent is to retreive the Class instance associated with the 
Action identified by the provided fully qualified name in order to 
save the time required for loading it via the class loader, since it 
could already have been instantiated by the controller itself!

What I am warried about is that the "actions" protected field in the 
ActionServlet class no longer exists in the 1.1 Struts release.

Might anyone tell me how this simple piece of code can be geared to 
Struts 1.1?

Thanks in advance,
Francesco.




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



_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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






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




Migrating from 1.0.2 to 1.1

2002-11-25 Thread Francesco Russo
Hi everybody,

I have a question concerning how to move a piece of code working with 
the Struts 1.0.2  release to the upcoming 1.1 stable one. What I do is:

public myActionServlet extends ActionServlet
{
   ...
   public Class getClass(String fullyQualifiedName)
   {
 FastHashMap fhm = this.actions;
 java.lang.Object obj = fhm.get( fullyQualifiedName );
 return obj.getClass();
   }
   ...
}

My intent is to retreive the Class instance associated with the Action 
identified by the provided fully qualified name in order to save the 
time required for loading it via the class loader, since it could 
already have been instantiated by the controller itself!

What I am warried about is that the "actions" protected field in the 
ActionServlet class no longer exists in the 1.1 Struts release.

Might anyone tell me how this simple piece of code can be geared to 
Struts 1.1?

Thanks in advance,
Francesco.




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