RE: dynamic javascript forms

2004-03-15 Thread Robert Nocera
I'm pretty sure you can do it if the text inputs are set up in the form as
an Array of Strings and if you create your input tags to match what struts
would expect from an array.  If you do that, you can have your javascript
create the fields dynamically as you said.

It sounds like you tried this and it didn't work for you, but I would think
it's probably just because you either didn't use an array setting up the
action form, or you didn't create html input tags that matched what struts
would have created if you used html:input.

-Rob 

-Original Message-
From: mike barretta [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 15, 2004 2:35 PM
To: [EMAIL PROTECTED]
Subject: dynamic javascript forms

thanks in advance for any help...

i have a form where i let the user choose how many text input fields 
they want and then via javascript, the inputs are displayed.

ex: user has a  box to make a choice of 1-10.  after selection 
is made, the onChange event will fire and write however many text inputs 
on the screen using the innerHTML property.

my problem is that since javascript changes the screen at runtime, i 
can't use  to capture the text from the form because it 
isn't being interpreted by struts.  if the javascript uses the standard 
 tags, it seems like my actionform doesn't get 
populated with the data.

so, anyway to do this without having to submit the form after the user 
selects how many inputs they want?


-
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: Fundamental Struts Concept

2004-03-15 Thread Robert Nocera
Ed,

I'm not sure I understand your question exactly, but I'll answer the best I
can.

The only information that is sent to the client is the HTML that you see in
the browser.  The JSP gets converted to a servlet and the servlet just
writes to the HTTPResponse, not the HTTPRequest.  The "request" you are
referring to is gone once the server sends a response.  The JSP that builds
the form can make use of as much data as is in the request, as it is all
stored on the server side as you said.

The new ActionForm the that is created after the user submits the form, from
the HTTPRequest that the client's brower created, is indeed new and does not
have access to any previously submitted client values unless they are 1.
Persisted in some persistent storage 2. persisted in the user's HTTPSession,
or 3. we included in the JSP as hidden fields (and presumably also the new
action form).

Does that help answer your question?

-Rob


-Original Message-
From: Ed Tornick [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 14, 2004 3:32 PM
To: [EMAIL PROTECTED]
Subject: Fundamental Struts Concept

Let's assume you have a Action Form with much data, including lists (you are
using nested tags for example). When you create the Action Form you load it
up with the data from your data source wherever it is. Let's also assume
that you have set the action path in the configuration file so that the
scope of this form is request.

If the jsp on the server that is going to create your form on the client has
only a few of the fields from the Action Form then how much data is actually
sent to the client in the httpRequest?

The reason I ask is that since it is my understanding that either a new
Action Form is created when the user submits the form or if one already
exists it is "reset",  how can the Action Form have all of the original
data, including the one or 2 fields the user just submitted?

If the scope was session then it would make sense to me that the data would
still be on the server and the users input would just modify a few fields..
but when it is request scope...This is what I don't understand. 

As you can see, probably a very fundamental question but it is key to me
understanding what is going on.

Thanks in advance for your input..
Ed


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



RE: Checking if user has a valida session

2004-03-13 Thread Robert Nocera
How about this:
 public boolean isUserAdmin(HttpServletRequest request)
 {  //Check if the Admin is logged on
   if (isLogged(request)) {
HttpSession session = request.getSession();
LogonForm user = (LogonForm)
session.getAttribute(Constants.USER_KEY);
return (user.isAdmin());
   } else {
return false;
 }

-Original Message-
From: Theodosios Paschalidis [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 13, 2004 11:42 AM
To: Struts Users Mailing List
Subject: Re: Checking if user has a valida session

Hi all,

I was just trying to figure out how to do that. (newbie) I have an app that
has some pages available for all, some for logged in users and some for
administrators.

I prevent access to logged-only pages by a tags that hide the relevant
functionality.
I have now written an abstract BaseAction with 3 methods: isSessionValid,
isLogged and isUserAdmin in order to implement Action based security.

My problem is that I can still go to my ".do" or ".jsp" pages directly by
typing in the URL. If I try to submit something instead of being forwarded
to, say, LogOff, I get this error
 java.lang.NullPointerException
at app.AbstActionBase.isUserAdmin(Unknown Source)
at app.InsertItemAction.execute(Unknown Source)

since my code checks based on a request that is not there! Any way to
prevent this?
Thank you for your time,
Theo


 public boolean isSessionValid(HttpServletRequest request)
 {
  if (request == null) return (false);
  HttpSession session = request.getSession();
  if (session == null) return(false);
return true;
}

 public boolean isLogged(HttpServletRequest request)
 {
 // Checked for a currently logged on user
 HttpSession session = request.getSession();
 LogonForm user = (LogonForm) session.getAttribute(Constants.USER_KEY);
 return ((user == null) ? false : true);
 }

 public boolean isUserAdmin(HttpServletRequest request)
 {  //Check if the Admin is logged on
 HttpSession session = request.getSession();
 LogonForm user = (LogonForm)
session.getAttribute(Constants.USER_KEY);
 return (user.isAdmin());
 }

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 12, 2004 8:50 PM
Subject: RE: Checking if user has a valida session


There are different ways of implementing a secure site, and many variables
involved.

When you say you want to see if the session is "valid," are you talking
about name/password authentication, or some other session attribute?

If the former, you can implement a standard J2EE security model in the web
app deployment descriptor (web.xml), specifying which user roles can access
which pages (such "*.do"), and exempting specified other resources (e.g.
"login.do").  This will automatically prevent users from accessing pages
without being authenticated first, and also enable you to configure session
timeouts easily.  It's also an easy, central, and standard method of
configuring security, and fits in neatly with the roles-based configuration
in the Struts config file.  Your options would work as well, but wouldn't be
very flexible or easy to manage, especially if you expect the application to
get big.



-Original Message-
From: Joao Batistella [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:55 PM
To: 'Struts Users Mailing List'
Subject: Checking if user has a valida session


Hello.

I have to check in my application if the user has a valid session in
every
page and, if not, redirect him to the login page.
What is the best way of doing this?

I see 3 options:

1. Put an include or tag in every page that checks this
2. Check this in my struts action
3. Use a servlet filtering to filter all .jsp or .do requests

I'm thinking about adopting solution number 3. Is it the best aproach?

Thanks,
JP

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



RE: [OT] - Request against Session

2004-02-13 Thread Robert Nocera
Actually, it's not two different sessions if the second window was opened
from the first with a popup or a crtl-n or "open in new window".


-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 2:30 PM
To: Struts Users Mailing List
Subject: RE: [OT] - Request against Session

At 08:41 AM 2/13/2004, you wrote:
>My interpretation of that comment was that if a user has two windows open
>and are going back and forth between the windows, the system may use
>information from one window to update the information in the session that
>actually relates to the old window.  This would be a pretty poor design,
but
>it's the only interpretation I can guess.

If there are two windows, there should be two sessions, and that should be 
okay.  Right? 



-
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: Calling JSPs directly

2004-02-13 Thread Robert Nocera
Andy,

Depending on the complexity of the application, you may want to consider
having the user call an action first, not a jsp.  The action can do any
setup for the jsp page, such as retrieving any collections you may need to
populate dropdown lists in the page.  Even if the action does nothing right
now, if wanted to add that type of functionality later or other
functionality that would require an action beforehand, the users would not
need to change their bookmarks.

-Rob


-Original Message-
From: Andy Engle [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 12:11 PM
To: [EMAIL PROTECTED]
Subject: Calling JSPs directly

Hi all,

I'm working with a web application in which I have multiple pages of
information, currently located in PHP files.  I want to convert these
PHP files into JSPs, and then make them available to be directly called
within my web application. I would like to have these JSPs available
for direct access because I want to make it easy for users of this
application to bookmarks whatever pages they're interested in going
back to from time to time. Each page will have a form, which will be
submitted to a Struts action when submitted, and then from there I want
the action to update the database, then return the same, updated JSP to
the user.

I'm wondering if making JSPs available to the user in this manner is a
poor practice, and if so, what would be a better way of doing it? 
Furthermore, will I run into any problems with the Struts custom tags
or tiles by taking this approach?

Thanks very much for sharing your thoughts.


Andy


-
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: [OT] - Request against Session

2004-02-13 Thread Robert Nocera
Mark,

My interpretation of that comment was that if a user has two windows open
and are going back and forth between the windows, the system may use
information from one window to update the information in the session that
actually relates to the old window.  This would be a pretty poor design, but
it's the only interpretation I can guess.

So the following could happen:
1. User chooses to edit order A.
2. Order A information is stored in the session and user is taken to an
order edit screen.
3. User chooses to edit order B in a new window.
4. Order B information is stored in the session and user is taken to an
order edit screen. 
5. User goes back to edit screen for order A and adds an item.
6. Because the session has Order B info in it, the info is either added to
Order B (instead of the intended Order A)

Seems to me a pretty easy thing to check if the info they are updating
relates to the info in the session, but that could be just me.

-Rob

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 13, 2004 11:22 AM
To: Struts Users Mailing List
Subject: Re: [OT] - Request against Session

Am i to assume that there's no issue then ? or am i being too stupid to 
warrant a response?





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



RE: Reading Context Data

2004-02-12 Thread Robert Nocera
If that code with the user2 variable works, it looks like the user code
should work unless there is another MDF_userBean class it is referencing.

Can you send the log file of the error you get running the action class you
included here?  The log file I see is for the previous version of this class
I think because the exception is on line 89 which is the "getClass" line.

And could you post the class that does the put into the context?

-Original Message-
From: Rassmann, Natalie D [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 12, 2004 11:32 AM
To: Struts Users Mailing List
Subject: RE: Reading Context Data

okay here is the code in a zip file.  I included the action and the jar
file where the bean in question is imported from.  I also included the
source code for the bean.

Any help you could provide would be much appreciated.

Thanks,

Natalie

-Original Message-
From: Villalba Arias, Fredy [BILBOMATICA] [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 12, 2004 11:25 AM
To: Struts Users Mailing List
Subject: RE: Reading Context Data


So am I!

If you send me the stack trace, the source code where the "put" gets done
and the source code containing the "get", I might spare some time to give
it a look. The action mapping would also help.

Can't promess anything. Don't expect and answer for today, ok? (have work
to do)  :)

Regards,
Freddy.


-Mensaje original-
De: Rassmann, Natalie D [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 12 de febrero de 2004 17:06
Para: Struts Users Mailing List
Asunto: RE: Reading Context Data

Yes I have verified the information is in the attribute.  I can extract it
and put it into an object variable just fine.  I can do a getClass on the
object variable and it is the right class name (beans.MDF_UserBean).  It
is when I do the direct cast with the class name that I get the
ClassCastException.

MDF_UserBean user = (MDF_UserBean)request.getAttribute("mdfUser");

This works:

Object user = (Object)request.getAttribute("mdfUser");

I am not importing more than one class with the same name either

I am baffled; this should work.

-Original Message-
From: Villalba Arias, Fredy [BILBOMATICA] [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 12, 2004 8:58 AM
To: Struts Users Mailing List
Subject: RE: Reading Context Data


Did you check that you are put-ing (into the Context) the correct object
(the one you expect to get afterwards?)?



Have you verified that the value you are put-ing (in case it's the right
one) is not being (unexpectedly) overwritten?



Are you using (/importing) more than one class with that same name
(different package)?



-Mensaje original-
De: Rassmann, Natalie D [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 12 de febrero de 2004 14:26
Para: Struts Users List (E-mail)
Asunto: Reading Context Data



Does anyone know how to read object data out of the context?

I have a web app which puts a Bean in to the web context data.  It then
forwards to my struts applications.  From within my action when I try to
read string data out of the context attribute, I have no problems.  When I
try to read the bean data out of the context, I keep getting a
ClassCastException.  Does anyone know what I am doing wrong.  Here are the
lines from my action:

 MDF_UserBean user = new MDF_UserBean();
 ServletContext ctx = this.getServlet().getServletContext();
  ctx = ctx.getContext("/emdf");
  user = (MDF_UserBean)ctx.getAttribute("mdfUser");

Thanks in advance


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003


-
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: [OT] - Request against Session

2004-02-12 Thread Robert Nocera
Shirish,

I'm not knocking the "workflow" concept, my only point earlier was that
someone shouldn't think it provides any real difference from session storage
except that it will attempt to automatically clear the session when they
leave that "workflow" and they won't have to put that logic in.

It's a good idea, but this latest message indicates that it limits its use
to applications that only allow a single "workflow" at a time.  I've worked
on many applications where there may be two or three valid workflows open
for a user at once, for example a help desk application where the operator
may be working on one issue and then need to open a new issue (in a new
window) for an incoming call in the middle of the current workflow, they are
both valid and neither contains "stale" data.

-Rob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Thursday, February 12, 2004 10:50 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [OT] - Request against Session


If the user has multiple windows open all sharing a session and does
different things in different windows things get really fun.


If user has different windows in different windows, then only the latest
windows workflow is honoured.SO all other window will have lost thier
workflow state if any...Which is desired behaviour in workflow like
situations...Where you dont want user to have multiple windows open and
accidently submit an old window with stale data thinking he was working with
the latest data...

But you are right in the sense that all such stuff should go in framework...




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



RE: [OT] - Request against Session

2004-02-12 Thread Robert Nocera
Brian said:
>Don't use getParameter() to try to get hidden form variables.
>getParameter() looks for parameters appended to the request URL --
>http://www.myhost.com/do/myAction?param1=1¶m2=2. getParameter() will
>give you access to param1 and param2.

The only reason not to use getParamter to get hidden form variables is to
make sure you are doing things in a Struts friendly way.  Technically,
"request.getParameter(...)" will return any value that is in the form or in
the request url as a parameter.  They are both treated the same way.

-Rob


-Original Message-
From: Barnett, Brian W. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 11, 2004 5:03 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] - Request against Session

When a browser first requests a page from a web server, the session is
created, so as Wendy said, "it's always there". The creation of the session
has nothing to do with whether the user is authenticated/logged in or not.
This is the way I understand it.

If you are set on using hidden variables here is a bit of info:

Using a hidden variable on a jsp page in Struts is pretty straightforward.
First, you add a variable to the formbean being used on the page with
corresponding setter/getter methods. Then in your jsp page, put something
like this in your form:



When the form is submitted, Struts finds a myFormBean object in the
appropriate scope (or instantiates a new one) and stuffs the value of the
hidden variable into myFormBean (using setter method). In other words, it
treats it like all the other form variables by calling the setter methods of
the formbean.

Then in your action class, you can reference the variable using the getter
method of your formbean. 

For multiple pages, you'd have to follow the above guidelines on each page
and most likely programmatically call the setter method in your action
classes between page calls.

Don't use getParameter() to try to get hidden form variables. getParameter()
looks for parameters appended to the request URL --
http://www.myhost.com/do/myAction?param1=1¶m2=2. getParameter() will
give you access to param1 and param2.

You can also very easily access the session variables in your action class
like this:

request.getSession().getAttribute("sessionVarName")

Brian Barnett


-Original Message-
From: Pani R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 11, 2004 2:02 PM
To: Struts Users Mailing List
Subject: RE: [OT] - Request against Session

Thanks for the advice Wendy.

I may end up storing all the values in the Session. But, on the other side,
how would I store it in the hidden form variable. I think if I store it in
my hidden variable, then its available to me in the action class via
getParameter() which will return me a String object against my User Defined
Object. Is there any other way to do that?

Pani

--

- Original Message -

DATE: Wed, 11 Feb 2004 13:27:11
From: Wendy Smoak <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Cc: 

>> From: Pani R [mailto:[EMAIL PROTECTED] 
>> Now, when the un-logged user tries to register, where am I 
>> suppose to store the Registration Values, Session or Request? 
>> Which one will be the better approach and why?
>
>I'm not entirely sure when the session officially gets created, I just
>expect it to be there, and it always is.  If you're going to need
>something across requests, you can either jump through hoops and put it
>in hidden form elements, etc., or just stuff it in the session.  
>
>I tend to treate memory and disk space as infinite resources, which may
>not scale, but works for my purposes.  My vote is to put your values in
>the session and don't look back.  Others may disagree...
>
>-- 
>Wendy Smoak
>Application Systems Analyst, Sr.
>ASU IA Information Resources Management 
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>




Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp
?SRC=lycos10

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



RE: [OT] - Request against Session

2004-02-12 Thread Robert Nocera

This is probably even more off topic, but I've seen this mentioned before.
>From what I can tell of their description of this "workflow" scope, it looks
like it may be helpful as far as ease of use goes, but it doesn't offer any
real technical benefit over the use of hidden form fields or sessions, in
fact, the underlying implementation has to be something passing parameters
of using the session, there just isn't any alternative in any compliant
application servers. 

As far as the objects being cleared when the user leaves the workflow, how
is that any different the using the session correctly?  If the user goes on
to another page that is not part of your current "workflow" you can clear
those objects or you wait until the user's session times out -- those are
really the only two options.

-Rob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Thursday, February 12, 2004 4:21 AM
To: [EMAIL PROTECTED]
Subject: RE: [OT] - Request against Session

Hi Guys,
I think the issue over here is, in such cases we need a new scope(workflow
scope).The existing scopes(request/session) do not suffice in such cases.

...
The session scope can be used but it may not be cleared.So there has to be a
solution at architecture level.And the struts workflow extension
http://www.livinglogic.de/Struts/introduction.html
...


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



RE: [OT] - Request against Session

2004-02-11 Thread Robert Nocera
Using the session is certainly a possibility, I for the most part, take the
opposite approach.  Generally the only objects I store in the session are
objects that are going to be accessed throughout the entirety of the user's
access to the site, stuff like authentication information and role
information.

I usually will use hidden form fields to carry information from one page to
the next, but it's usually a small amount of information such as the keys
for objects that may be needed for a next page.

I also find that if the entire application is architected so that all the
information an action needs is in the request as parameters, it becomes
truly simplistic to rearrange the workflow or add links to existing pages in
places you might not have expected them originally because the call requires
nothing more than the correct request parameters.

-Rob


-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 11, 2004 4:45 PM
To: Struts Users Mailing List
Subject: Re: [OT] - Request against Session

There was an interesting posting the other day on this, I tend to stick  
stuff in the session because I cant be arsed messing around. After  
things are working I then see whether i can move things out. There  
seems to be a lot on not storing stuff in the session i imagine because  
things can get kinda heavy but then this begs the question what are  
sessions for?

I think people become a bit paranoid about sessions because java is  
kinda heavy in this respect, and garbage collection has remained an  
issue since its beginnings. But IMO thats for the folks you build the  
JVM's to worry about.

If you want something to persist beyond the request then I suggest put  
it in the session. By the time you've messed around trying to avoid  
this you could have brought more hardware to deal with the problem.

I'd say same as wendy, although look back if anything breaks.

IMO storing values as hidden form values is ugly, I'd use it as a hack  
if using session breaks anything (which is doubtful) just set stuff to  
null when you're finished and hope the garbage collector comes along.



On 11 Feb 2004, at 22:01, Pani R wrote:

> Thanks for the advice Wendy.
>
> I may end up storing all the values in the Session. But, on the other  
> side, how would I store it in the hidden form variable. I think if I  
> store it in my hidden variable, then its available to me in the action  
> class via getParameter() which will return me a String object against  
> my User Defined Object. Is there any other way to do that?
>
> Pani
>
> --
>
> - Original Message -
>
> DATE: Wed, 11 Feb 2004 13:27:11
> From: Wendy Smoak <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Cc:
>
>>> From: Pani R [mailto:[EMAIL PROTECTED]
>>> Now, when the un-logged user tries to register, where am I
>>> suppose to store the Registration Values, Session or Request?
>>> Which one will be the better approach and why?
>>
>> I'm not entirely sure when the session officially gets created, I just
>> expect it to be there, and it always is.  If you're going to need
>> something across requests, you can either jump through hoops and put  
>> it
>> in hidden form elements, etc., or just stuff it in the session.
>>
>> I tend to treate memory and disk space as infinite resources, which  
>> may
>> not scale, but works for my purposes.  My vote is to put your values  
>> in
>> the session and don't look back.  Others may disagree...
>>
>> --  
>> Wendy Smoak
>> Application Systems Analyst, Sr.
>> ASU IA Information Resources Management
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> 
> Find what you are looking for with the Lycos Yellow Pages
> http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/ 
> default.asp?SRC=lycos10
>
> -
> 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]



RE: [OT] Sending email from struts

2004-02-11 Thread Robert Nocera
You might want to try something like velocity so you can store the text of
the e-mail as a template and use velocity to insert the dynamic content.

If there are really only a few simple fields, I would store the text in the
database or an xml file and then use a simple string replace routine to
replace tags like {ORDER_ID} and {USER_NAME} with the order id and user name
before passing that message to the mailer.

-Rob


-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 11, 2004 11:03 AM
To: strutslist
Subject: [OT] Sending email from struts

Hi all.

This is kind of off topic as it is not really struts related, but somebody
here would probably have the answer.

We have our application sending emails to users at some points and it is
working fine. The problem is that we have the email message hardcoded into
the Java, which we would like to avoid either by storing the message in
application.properties or our database. This would be easy, except all of
the messages contain user-specific information like their name or phone
number or order id or something like that.

Anybody have any ideas (or links to programs!) that can read in an email,
replace the information it needs to from the db, and send that to the user.

I could obviously write something myself to do it, but wouldn't want to
reinvent the wheel.

Turns out this is hard to search for too - email is not a search term that
makes things easy.

Thanks,
Matt Bathje


-
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: Data truncation in request scope

2004-02-06 Thread Robert Nocera
It may sound strange, and may not be what is happening to you, but I have
seen similar things occur if your jsp page has a tag referencing a bean or
list that isn't there somewhere further down on the page.

 

-Rob

 

  _  

From: Namasivayam, Sudhakar (Cognizant) [mailto:[EMAIL PROTECTED]

Sent: Friday, February 06, 2004 1:19 PM
To: Struts Users Mailing List
Subject: Data truncation in request scope

 

 

hi all, 

I am passing a lot of data from the action class through the request = 
scope 

but the data is getting truncated... ie there are 50 elements in the
arraylist only 25 are displayed 
Is there any limit on the amount of data that can be sent or there any = 
time out pbms 

 

Thanks & regards, 
N Sudhakar 
+91-44-2254055x7360 



RE: [OT]CVS client

2004-02-04 Thread Robert Nocera
I'm not sure what you are asking, but I use Eclipse, versions 2.01 and 3.0M
and if you synchronize with cvs you can see each file that is different and
go through each change in the compare panes.  I find it works like a charm.

-Rob

-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 04, 2004 3:12 PM
To: Struts Users Mailing List
Subject: RE: [OT]CVS client

I use Eclipse as well...but the problem Im facing is I could not able to
find out the locally changed file when I merge with CVS server...Im looking
for something like separate GUI CVS client where I can view all the files in
detail..something like WinCVS(somehow I could able to install this).

Tnx for your help

-Ramadoss


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 3:00 PM
To: Struts Users Mailing List
Subject: Re: [OT]CVS client


The Eclipse CVS integration is pretty nice, thats what I 
have been doing but I'm no power user.

John-

On Wed, 4 Feb 2004 15:33:11 -0400
  "Franck Lefebure" <[EMAIL PROTECTED]> wrote:
>Le Tuesday, February 03, 2004 4:17 PM,
>Ramadoss Chinnakuzhandai <[EMAIL PROTECTED]> 
>m'a, d'une plume
>avisee, ecrit:
>
>> Hi,
>> can anybody suggest me any better CVS client 
>>other than
>> WinCVS and JCVS?
>>
>I use Sun One Studio built in cvs client for "little" cvs 
>actions (add,
>commit)
>and cvs unix command line on the server for "mass" cvs 
>actions (checkout,
>imports)
>
>works fine
>
>bye
>
>-- 
>Franck Lefebure
>
>
>-
>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]



RE: Struts text field 'value' attribute set from another ActionForm?

2004-01-29 Thread Robert Nocera

You could call an action before going to the form that takes the value from
the session and sets someForm.someProperty to that value and then forwards
to your jsp.  

-Rob

-Original Message-
From: Adam Bickford [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 9:55 AM
To: [EMAIL PROTECTED]
Subject: Struts text field 'value' attribute set from another ActionForm?

I have a web form such as:





How can I set a default value for the text field, where the value I want 
is in a different session scoped ActionForm than the one named in the 
 tag? The only way I've been able to do it is saving a 
value as a session attribute and retrieving it with a scriptlet, like this:

"/>

This approach works, but should I need to use a scriptlet and 
sessionAttributes to do this? I've heard that it's best to avoid putting 
scriptlet/java code in my jsp pages. What I'd like to do is reference 
the value in the existing session scoped ActionForm, such as:



Can something like this be done?



-
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: Session Problem

2004-01-26 Thread Robert Nocera
If there is no server activity, is it possible the page you are looking at
is cached?

-Rob

-Original Message-
From: VERMA, SANJEEV (SBCSI) [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 26, 2004 12:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Session Problem

I put the topic as "Re: Session Problem" because it may be related with same
problem.

In my application I am using Struts 1.1 and WebSphere 5.0. 

First time when I login into the application it works fine.
The problem starts after that, when I open a new browser not by Ctrl+N or
File-->New-->Window, but I start a new Browser from my "Windows 2000 Start"
randomly I found myself auto logged in to my application and it happens like
1 in 10 times only.
The strange thing is even when I logged-in on my machine, if I open the
login page from other's machine also the same problem happens. Irrespective
of from where I go to login page randomly I found myself logged-in.
It is not like it happens just with my ID, it happens with anybody's ID.
And whenever that auto-login happens , it doesn't show any activity on
server(I check log files for that).

It is really a weird problem, if anybody has faced similar kind of problem,
please let me know.
By the way the WebSphere 5.0 is on AIX box.

Your help will be appreciated.
Regards
Sanjeev

-
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: retreiving the labelProperty of an option tag

2004-01-23 Thread Robert Nocera
That's correct, the form is only going to submit the value not the label for
the option.  You might use javascript to populate a hidden field with the
label so it gets submitted, if you really wanted to, but it would be much
easier to just look up the label in your action using the value you received
in the form and the collection that populated the list.

-Rob


-Original Message-
From: Vinicius Carvalho [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 23, 2004 7:30 AM
To: [EMAIL PROTECTED]
Subject: retreiving the labelProperty of an option tag

Hi there! I have a code to render a select/option that looks like this :



In my form I have the getter for this, that returns the code for the 
desired Objective.
So in my action, when I fill the VO, I add the code by:
ModelVO.setObjective(form.getObjective());

Ok, so far so good. But how do I get the labelProperty for this objective? 
Once my form gets only the property 

Thanks

Vinicius 


-
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: AW: Form is not submited - nothing happens?!?

2004-01-23 Thread Robert Nocera

Are you sure you are not getting any javascript errors?  The best place to
debug something like this is to use Mozilla.

If your  tag is resulting in an input field with the name
"submit" you are going to get an error that tells you something like "submit
is not a function".

Just a thought,
-Rob

-Original Message-
From: Matthias Winkler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 22, 2004 12:18 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: AW: Form is not submited - nothing happens?!?

HI,

the 'submitFunction()' is being called by my
 tag (code in the template for the
tag). The interesting thing is that the function is
really called. The alert() is done but not the submit.
So I guess there must be a mistake in the
configuration. But I really do not know where to look
for the mistake.
Thanks for your help.

Matthias

--- Martin Sturzenegger
<[EMAIL PROTECTED]> wrote:
> hi,
> the caller for the javascript seems to be missing.
> you might try something like
> 
>  onsubmit="return submitFunction();"> 
> 
> [save]
>
> 
> 
> 
> hope it helps
> cheers
> martin
> 
> 
> 
> 
> 
> 
> -- Urspruengliche Nachricht
> --
> Von: Matthias Winkler <[EMAIL PROTECTED]>
> Antworten an: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> Datum:  Wed, 21 Jan 2004 16:34:18 -0800 (PST)
> 
> >Hi,
> >I am trying to submit a form. I have the following
> >things:
> >struts-config.xml:
> > >  path="/finishPickActionMulti"
> > 
>
>type="com.sap.cr.mima.warehouse.struts.actions.FinishPickMultiAction"
> >  name="warehouseForm"
> >  scope="session"
> >  validate="true"
> >  input="/multi/pick_multi.jsp">
> >  
> >   path="/multi/box_scan.jsp"/>
> >
> >
> >
> >jsp:
> ><%@ taglib uri="http://java.sun.com/jstl/core";
> >prefix="c"%>
> ><%@ taglib uri="/WEB-INF/struts-bean.tld"
> >prefix="bean" %>
> ><%@ taglib uri="/WEB-INF/struts-html.tld"
> >prefix="html" %>
> ><%@ taglib uri="/WEB-INF/mima-xv.tld" prefix="xv"
> %>
> >
> > >onLoadFocus="submit" textPrompt="Picking Process"
> >onLoadVoicePrompt="" />
> >
> >
> >
> >  function submitFunction(){
> >alert("test");
> >document.warehouseForm.submit();
> >  }
> >
> >
> >  >focus="submit">
> > >prompt="Done with box." />
> > 
> >
> >
> >>From my xv:message tag the JS-function
> >submitFunction() is being called but the submit is
> not
> >being done. I want to submit the 'warehousForm'.
> This
> >is the name of the form that appears in the final
> html
> >page.
> >When I call this jsp-page I do not get any error
> >messages. What is the best place to start to look
> for
> >the 'error'?
> >
> >Thanks,
> >Matthias
> >
> >__
> >Do you Yahoo!?
> >Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> >http://hotjobs.sweepstakes.yahoo.com/signingbonus
> >
>
>-
> >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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

-
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: Filling data in the select tags

2004-01-19 Thread Robert Nocera
In your execute method, instantiate a new ActionForm for Y, populate it, and
put it in the request using request.setAttribute, assuming you are using
request scope, that is.

-Rob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 1:34 PM
To: Struts Users Mailing List
Subject: RE: Filling data in the select tags


Hi there,

But how do you get an ActionForm to populate?  If I'm on page X, trying to
get to page Y, I would need the ActionForm for Y, and all I have in my
execute method is the ActionForm for X.

Mike

Mike Boucher  [EMAIL PROTECTED]
Edgil Associates  www.edgil.com

"Don't take life too seriously, you'll never get out of it alive!"


 

    "Robert

Nocera"  To: "'Struts Users Mailing
List'" <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]cc:

llc.com> Subject: RE: Filling data in
the select tags  
 

01/19/2004

12:37 PM

Please

respond to

"Struts Users

Mailing List"

 

 





The ActionForm is also used to display data on the JSP, so the method that
Andrew describes is a good way to go about it.  When the user requests to
go
to a page, make sure that request is to an action and not directly to a
jsp.

As Andrew mentioned he has done, I have also moved from using separate
beans
to display data to using the ActionForm to hold the display data.  If you
consider the ActionForm as just a piece of the view, it makes perfect
sense.
The only time I go outside the ActionForm is when I need to display a list
of items, say for a dropdown selection, in that case I'll just set the list
in the request separately.

-Rob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 11:43 AM
To: Struts Users Mailing List
Subject: RE: Filling data in the select tags


Hi folks,

I'm also new to struts, and setting any fields before the page is displayed
is something that I'm having trouble with.

Here's a few things I need to do.
1) A user logs in to the application.  I need to display the login name on
every page of the application.
2) After one page, some processing is performed, and a result code is
displayed to the user on the subsequent page.

How do I get this data to display on my page?

Below, Andrew says that you can put the info in the actionForm, which is
where it makes sense to me to have it.   But I can't figure out how to even
do that.  It would make sense to populate an actionForm and send it to the
request, but everything I've seen suggests that the actionForm is created
upon submit, and not used for input.

I'm just horribly confused...

Thanx for any help.

Mike

Mike Boucher  [EMAIL PROTECTED]
Edgil Associates  www.edgil.com

"Don't take life too seriously, you'll never get out of it alive!"




"Andrew Hill"

<[EMAIL PROTECTED]To: "Struts Users
Mailing List" <[EMAIL PROTECTED]>
dnode.com>cc:

  Subject: RE: Filling
data in the select tags
01/19/2004 07:33 AM

Please respond to

"Struts Users Mailing

List"









You would look up thge information (form the db or whatever) in an Action
that precedes the view. This (setup) action obtains all the necessary
dynamic info that the view (JSP) will need to render the view with, it then
forwards to the view page.

As you say, you have several options for where to put the info. You could
store it directly in request attributes, your could put it all together in
a
bean in the request, or you could add it to the actionForm. Speaking for
myself these days I find myself gravitating towards using the actionform
for
this sort of thing (I used to keep it quite seperate but nowdays am
favouring the opposite point of view!) thinking of the the actionform, not
so much as a mere input buffer, but more as a representation of the UI
state
for that page. One could nest the the ui info in a bean in the actionform
to
clearly delineate it from the input properties (and perhaps build
safegaurds
into the setter so it can be called by processPopulate!)

Id be interested to hear what other members of the list have to say about
best practice in this.

Using the session has the advantage that you would only need to go through
the setup action once so for things like wizards this can be useful.
(Storing in the form, and having the form in session gives same

RE: Filling data in the select tags

2004-01-19 Thread Robert Nocera
The ActionForm is also used to display data on the JSP, so the method that
Andrew describes is a good way to go about it.  When the user requests to go
to a page, make sure that request is to an action and not directly to a jsp.

As Andrew mentioned he has done, I have also moved from using separate beans
to display data to using the ActionForm to hold the display data.  If you
consider the ActionForm as just a piece of the view, it makes perfect sense.
The only time I go outside the ActionForm is when I need to display a list
of items, say for a dropdown selection, in that case I'll just set the list
in the request separately.

-Rob

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 11:43 AM
To: Struts Users Mailing List
Subject: RE: Filling data in the select tags


Hi folks,

I'm also new to struts, and setting any fields before the page is displayed
is something that I'm having trouble with.

Here's a few things I need to do.
1) A user logs in to the application.  I need to display the login name on
every page of the application.
2) After one page, some processing is performed, and a result code is
displayed to the user on the subsequent page.

How do I get this data to display on my page?

Below, Andrew says that you can put the info in the actionForm, which is
where it makes sense to me to have it.   But I can't figure out how to even
do that.  It would make sense to populate an actionForm and send it to the
request, but everything I've seen suggests that the actionForm is created
upon submit, and not used for input.

I'm just horribly confused...

Thanx for any help.

Mike

Mike Boucher  [EMAIL PROTECTED]
Edgil Associates  www.edgil.com

"Don't take life too seriously, you'll never get out of it alive!"


 

"Andrew Hill"

<[EMAIL PROTECTED]To: "Struts Users
Mailing List" <[EMAIL PROTECTED]>  
dnode.com>cc:

  Subject: RE: Filling
data in the select tags  
01/19/2004 07:33 AM

Please respond to

"Struts Users Mailing

List"

 

 





You would look up thge information (form the db or whatever) in an Action
that precedes the view. This (setup) action obtains all the necessary
dynamic info that the view (JSP) will need to render the view with, it then
forwards to the view page.

As you say, you have several options for where to put the info. You could
store it directly in request attributes, your could put it all together in
a
bean in the request, or you could add it to the actionForm. Speaking for
myself these days I find myself gravitating towards using the actionform
for
this sort of thing (I used to keep it quite seperate but nowdays am
favouring the opposite point of view!) thinking of the the actionform, not
so much as a mere input buffer, but more as a representation of the UI
state
for that page. One could nest the the ui info in a bean in the actionform
to
clearly delineate it from the input properties (and perhaps build
safegaurds
into the setter so it can be called by processPopulate!)

Id be interested to hear what other members of the list have to say about
best practice in this.

Using the session has the advantage that you would only need to go through
the setup action once so for things like wizards this can be useful.
(Storing in the form, and having the form in session gives same effect of
course, plus the advantage that you can change the scope of the lot from a
single attribute in struts-config!)

-Original Message-
From: Florin Pop [mailto:[EMAIL PROTECTED]
Sent: Monday, 19 January 2004 20:12
To: '[EMAIL PROTECTED]'
Subject: Filling data in the select tags


Hi there,

I am new to Struts and I am wondering how can I handle the following
situation: I have a form where I have some fields for entering user data.
Some of the fields are combo boxes ( in html), for example a list
of
countries. My question is how can I fill the data in the countries
combobox?
Where should I store the data required for filling the combo? In the
ActionForm or should I put it into another bean which is stored in the
session or in the request?
where should I fill the list with the countries in an Action class?

Thanks in advance,

Florin

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


--

RE: accessing an image outside my webapp

2004-01-15 Thread Robert Nocera
Actually Martin, if the link is " file:///test.jpg", as in the message, it
isn't a relative request.  If it was just "/test.jpg" it would be relative
to the context of the web-app, but it's not.

-Rob


-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 10:29 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: accessing an image outside my webapp

Robert
The client browser is making a request to a webserver using a "relative
address" I think it would be best to understand the difference between
"relative addressing" and "absolute addressing"
I invite you to read
http://www.drizzle.com/~slmndr/tutorial/relabs.html
-Martin
- Original Message -
From: "Robert Nocera" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 10:25 AM
Subject: RE: accessing an image outside my webapp


> I don't think Tomcat does, but your local browser will.  You are sending
> your browser a link that tells it to load a file on your file system.  It
> will work fine if you are only running locally, but it won't work if you
try
> to access that link from a browser on another machine unless that machine
> also has the same file locally.
>
> -Rob
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 15, 2004 10:14 AM
> To: Struts Users Mailing List
> Subject: Re: accessing an image outside my webapp
>
> by jingo. it only works!!
>
> just src rather than href
>
> 
>
> I thought tomcat wouldn't have access to anything outside the webapp.
>
>
> On 15 Jan 2004, at 15:03, Richard Hightower wrote:
>
> > seems like an odd request... but here goes...
> >
> > 
> >
> > html:img supports three attributes for specifyin the location of an
> > image
> > forward (referes to a global forward), page (relative to the current
> > web
> > context), and href (any valid URL).
> >
> > Rick Hightower
> > Developer
> >
> > Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm
> >
> > Struts/J2EE consulting --
> > http://www.arc-mind.com/consulting.htm#StrutsMentoring
> >
> > -Original Message-
> > From: Alain Van Vyve [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, January 15, 2004 7:35 AM
> > To: [EMAIL PROTECTED]
> > Subject: accessing an image outside my webapp
> >
> >
> >
> > I have a JSP where I would like to show an image located outside my
> > webapp
> > (e.g. in a c:\photo directory)  ...
> >
> > How to do that with the  Struts tag ??
> >
> > Thanks
> >
> > Alain
> >
> >
> > -
> > 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]


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



RE: accessing an image outside my webapp

2004-01-15 Thread Robert Nocera
I don't think Tomcat does, but your local browser will.  You are sending
your browser a link that tells it to load a file on your file system.  It
will work fine if you are only running locally, but it won't work if you try
to access that link from a browser on another machine unless that machine
also has the same file locally.

-Rob

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 10:14 AM
To: Struts Users Mailing List
Subject: Re: accessing an image outside my webapp

by jingo. it only works!!

just src rather than href



I thought tomcat wouldn't have access to anything outside the webapp.


On 15 Jan 2004, at 15:03, Richard Hightower wrote:

> seems like an odd request... but here goes...
>
> 
>
> html:img supports three attributes for specifyin the location of an 
> image
> forward (referes to a global forward), page (relative to the current 
> web
> context), and href (any valid URL).
>
> Rick Hightower
> Developer
>
> Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm
>
> Struts/J2EE consulting --
> http://www.arc-mind.com/consulting.htm#StrutsMentoring
>
> -Original Message-
> From: Alain Van Vyve [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 15, 2004 7:35 AM
> To: [EMAIL PROTECTED]
> Subject: accessing an image outside my webapp
>
>
>
> I have a JSP where I would like to show an image located outside my 
> webapp
> (e.g. in a c:\photo directory)  ...
>
> How to do that with the  Struts tag ??
>
> Thanks
>
> Alain
>
>
> -
> 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]



RE: ActionForm is not automatically popluated.

2004-01-14 Thread Robert Nocera
Without seeing any of your code, one possibility is that the case of your
property names isn't properly matching your Form.  For instance, the
property "lastname" isn't going to match setLastName() in your form, but
"lastName" will.  

-Rob
www.neosllc.com


-Original Message-
From: Andre Risnes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 12:05 PM
To: Struts Users Mailing List
Subject: ActionForm is not automatically popluated.

Hi,

I have a tomcat/struts/velocity application that uses a
fairly standard ActionForm bean to validate user input.
My problem is that none of the fields in the ActionForm
bean become populated when the user submits the form. 

I can retrieve the values from the form in the pRequest
parameter to the ActionForm.validate() method. The name
of the get/setFoo() methods in the ActionForm bean
matches the names of the fields in the submitted form. 

What could be the problem?

JDK version 1.4.2_02
Tomcat version 4.0.6
Struts version 1.1

-- 
Regards 
André Risnes

-
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: Getting parameters from html:link

2004-01-14 Thread Robert Nocera
I think what you want is:
String type = request.getParameter("type");


-Original Message-
From: Lucas Gonzalez [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 12:01 PM
To: Struts Users Mailing List
Subject: Getting parameters from html:link

Hi!
I´ve been trying to get aditional parameters that came in a html:link that
with no success.

the link is this one



and "notBilled" was aded to the request like this:
public Map getNotBilled() {
  Map map = new HashMap();
  map.put("type", "NotBilled");
  return map;
}

the problem is that when I do a
request.getSession(true).getAttribute("type");
returns null always.

There´s anything i´m doing wrong? I´ve been reading the mailing lists, but
haven´t found something useful...

Best Regards,
Lucas


-
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: Validator JavaScript displaying? Mozilla bug?

2004-01-14 Thread Robert Nocera
Brad,

I am using Mozilla 0.7 and I saw what you described the first time I went to
your page.  I can't get it to repeat however.  Then I tried for kicks on
another machine and didn't see it at all.

On that other machine I am just getting validator set up on a project and I
tried it, and it looked fine each time in Mozilla.  I did notice that I put
the tags for the javascript outside the  tags but inside the 
tags,whereas your are in the middle of the page.

Maybe the first time it loads, since it hasn't loaded the entire page, it
gets confused and displays the javascript but on subsequent loads, it is
probably coming from cache and has the entire html and so renders it
correctly?  A little far-fetched maybe.

I would try moving your javascript tag outside of the  tags and see
what kind of result you get.

-Rob

Rob Nocera
www.neosllc.com


-Original Message-
From: Brad Plies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 14, 2004 10:32 AM
To: [EMAIL PROTECTED]
Subject: Validator JavaScript displaying? Mozilla bug?

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]



RE: sharing actions with superuser

2004-01-12 Thread Robert Nocera
Dan,

I would base the decision on how similar the actions are.
Some possible choices are:
1.  Use the same action with the same method as you describe.
2.  Use the same action but define two different methods within the action
based on what the user's role is.  This way you can include private methods
which can be common to both roles.
3.  Same as 2, except define a base action class and have two different
actions share that base class and define common methods in the base class.
4.  As you mention, completely separate actions, forms, and jsps.

I have used all of the above depending on the situation.  For example, in
one case, 6 different reports were being called, but all used the same
external call to run the reports and all shared 3 of the same lookup keys.
In this case I had a base report action class which defined all the common
methods and built additional report action classes for each report.  Then
when a report was added, I just created a new action based on my report base
and added whatever else I needed in the new class.

As far as the JSPs are concerned, if I find more than a couple if statements
in my JSP, I would make two separate pages instead.  I find it's easier to
maintain that way even though in some cases you will be making the same
changes in two different files.

In your case, I would suggest option 2 and possibly even the same JSP
page(s) if you could code it so the logic is all in the action.

Just my 2 cents,
-Rob

Rob Nocera
www.neosllc.com



-Original Message-
From: Dan Allen [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 12, 2004 12:41 PM
To: [EMAIL PROTECTED]
Subject: sharing actions with superuser

This seems to be a common design problem, so I figured i would take
it to the struts list for advice.  In my application, a user can
login and perform functions, such as viewing/altering one's own
profile.  Additionally, a user can have "superuser" priviledged, in
which case they can alter other user's profiles.  Would it be better
to split this into two actions or try to merge it in as a single
action?  If I did it as a single action, there would be a lot of

if (request.isUserInRole('ADMIN'))
{
contact =
contactFacade.getContact(request.getParameter('user'));
}
else
{
contact = contactFacade.getContact(request.getRemoteUser()); 
}

within the action.  Additionally, different messages would be
needed, different forwards would be targeted and the views would be
different because they may need different messages, different return
pages, etc.

In short, it seems like I am performing the same action, but
in many ways it is more different than the same.  I sure which there
was a nice example of a "superuser" like interface that was
effecient.  Anyone have any thoughts or followup questions?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Real programmers just hate to get up in the morning, and 
contrary to Ordinary People, they're in better shape as 
it gets closer to nighttime.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

-
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: AW: struts get and set methods in formbeans

2002-03-26 Thread Robert Nocera

Jose,

Jim is correct, your getters and setters correspond to what is in your
JSP according to the Java Bean specification.  The private variable name
can be whatever you want, but generally to make things maintainable and
easy to understand the variable names and getter/setter names are
related.

One implementation that I've seen is something like a private variable
called "_test" and getTest, setTest as getter/setter names, and it works
fine.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: Jose Casas [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:16 AM
To: 'Struts Users Mailing List'
Subject: RE: AW: struts get and set methods in formbeans

Thanks for the replies.  Does anybody else have an opinion as to which
is
right?

Thanks.

Jose Casas

E-Commerce Applications
(501) 277-3112
[EMAIL PROTECTED]



> -Original Message-
> From: Jim Crossley [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 9:10 AM
> To:   Struts Users Mailing List; [EMAIL PROTECTED]
> Subject:  Re: AW: struts get and set methods in formbeans
> 
> I don't think that's correct.  As long as you refer to the "password"
> property in your JSP, you may use getPassword/setPassword, regardless
> of the name of the data member they encapsulate.
> 
> In other words, it's not the name of the private data member that
> determines the names of your public accessors.  It's the name used in
> your JSP's.
> 
> -- Jim
> 
> Oliver Reflé <[EMAIL PROTECTED]> writes:
> 
> > Yes it has to be the same, if you have "test" you have to implement
> > getTest() and setTest()
> > 
> > -Ursprüngliche Nachricht-
> > Von: Jose Casas [mailto:[EMAIL PROTECTED]]
> > Gesendet: Dienstag, 26. März 2002 15:42
> > An: 'Struts Users Mailing List'
> > Betreff: struts get and set methods in formbeans
> > 
> > 
> > Hello,
> > 
> > I got a question about the get and set methods in the form beans.
Does
> the
> > get or set method need to have the name of the member variable in
it?
> > For example, if I have a member variable named userPassword do I
have to
> > have a get/set method called getuserPassword/setuserPassword or can
I
> put
> > getPassword/setPassword.  I guess what I'm asking is does the
variable
> have
> > to appear exactly the same in the get/set method.
> > 
> > Thank you.
> > 
> > 
> > 
> >
**
> > This email and any files transmitted with it are confidential
> > and intended solely for the individual or entity to
> > whom they are addressed.  If you have received this email
> > in error destroy it immediately.
> >
**
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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


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




RE: Javascript problem referencing nested form fields

2002-03-26 Thread Robert Nocera

Somebody once answered that question for me.
Try:
document.forms[0].elements['address.number']
instead.


Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: Frederico Schuh [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 10:05 AM
To: [EMAIL PROTECTED]
Subject: Javascript problem referencing nested form fields

I'm using nested beans inside my ActionForms, and thus
I have to reference those bean properties with dots
(like address.number) in the JSP file. So, the
generated HTML would be something like this:


   


The problem is that I can't find a way to reference
those form fields if I want to do some javascript
validation. If I do something like
"document.forms[0].address.number" it doesn't work.
How do I do it?


=

Frederico Ferro Schuh
[EMAIL PROTECTED]
ICQ: 20486081


___
Yahoo! Empregos
O trabalho dos seus sonhos pode estar aqui. Cadastre-se hoje mesmo no
Yahoo! Empregos e tenha acesso a milhares de vagas abertas!
http://br.empregos.yahoo.com/

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


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




RE: Pass parameters between Action classes

2002-03-24 Thread Robert Nocera

A JSP is a servlet so the "request" in your JSP is the same as the
"request" passed to your Action from the ActionServlet.  Maybe your
forward has redirect set to "true"?  If it does, the browser is making a
new request and so anything you added with request.setAttribute will be
lost.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: Enrique Rodriguez [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 24, 2002 10:23 AM
To: Struts Users Mailing List
Subject: RE: Pass parameters between Action classes

Hello,

Thanks for your response. I think the problem is with the request
object.

When can i get the paremeters from it??? Only When I'm in a JSP?

I Attach my example. Please take a look.

Regards, Enrique.
_
Enrique Rodriguez Lasterra


> Jim Crossley
>
>
> As long as the first action's forward element in struts-config refers
> to an Action servlet and not a jsp, your example should work.
> Something like this maybe:
>
> 
>   
> 
> 
>
> "Enrique Rodriguez" <[EMAIL PROTECTED]> writes:
>
> > I'm very newbie with struts and i have one question:
> >
> > Is possible pass paramter throwugh action classes???
> >
> > I explain it better??
> >
> > Action 1:
> > String param = "param";
> > request.setAttribute("param", param);
> > return (mapping.findForward ("Action2"));
> >
> > Action 2:
> > String param = (String)request.getAttribute("param");
> >
> >
> > I'm trying to do it but its imposible. The only way to pass
> parameters is
> > with a Form class.
> >
> > What am I doing wrong???
> >
> > Thanks in advance and pardon for my english, Enrique.
> >
> > _
> > Enrique Rodriguez Lasterra
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
Jim Crossley
http://www.lads.com/~jim

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


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




RE: Questions about session timeouts/struts

2002-03-20 Thread Robert Nocera

They do, but when is dependent on the specific application server and
Java run-time that you are running it on.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 20, 2002 12:58 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]
Subject: RE: Questions about session timeouts/struts


Thanks Robert:

This is great information.

I was curious if the beans in the timed-out session automatically get
descoped and garbage-collected?

thanks,
Theron



 

        Robert Nocera


<[EMAIL PROTECTED]>  
 cc:

03/20/02 Subject: RE: Questions
about session timeouts/struts  
09:52 AM

Please

respond to

Struts Users

Mailing List

 

 




If the session times out or is invalidated, you will no longer be able
to access the same session using request.getSession().  Any session you
do access will be a new instance.  This means that any objects in the
session are probably not accessible to your application any longer.

You can implement HttpSessionBindingListener on a bean that you store in
session and then implement the valueUnbound method to do something when
your bean is removed from the session.

This worked for me in Tomcat and let me know when a session was being
timed out, but I found that other application servers, such as
SilverStream, do not behave the same way. The session times out, but the
beans are not unbound and so the method is never called.  From the spec
I don't think invalidating a session requires beans to be unbound if it
does, I think it is a bug in SilverStream's implementation.

Hope this helps,

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 12:27 PM
To: Struts Users Mailing List
Subject: Questions about session timeouts/struts


Hi Folks:

Don't really know much yet about this...I've implemented
sensitive-form
resubmissions by way of tokens within actions but have a question about
when a session times out...

Under Apache (I don't know where yet), I suspect there's a
timer/variable
in some configuration file that says how long a session bean is valid
without any hits before it times out.I also think one can call
explicity "request.getSession().invalidate()" which does the same thing
but
affects all session beans

So here's my question(s):
- Anyone have any advice on how to deal with this programatically?
- When session beans do "timeout" or become "invalid", are they
automatically cleaned up by the system?So in essance if I have a
bean
called "fooBean" that I added via (request.getSession().setAttribute
("fooBean", fooBeanInstance)   AND if the session automatically times
out
(without me calling request.getSession().removeAttribute("fooBean")),
does
the tomcat contain remove "fooBean" from the session scope or will it
still
be there if I call "request.getSession().setAttribute("fooBean")"

I'd like to understand a little bit more on how best to handle/deal with
situations where the session becomes invalid() or times out.   What
happens
to all the beans/data contained for that session.With struts, do all
formbeans with session scope become defunct?

thanks,
Theron


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


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




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


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




RE: Questions about session timeouts/struts

2002-03-20 Thread Robert Nocera

If the session times out or is invalidated, you will no longer be able
to access the same session using request.getSession().  Any session you
do access will be a new instance.  This means that any objects in the
session are probably not accessible to your application any longer.  

You can implement HttpSessionBindingListener on a bean that you store in
session and then implement the valueUnbound method to do something when
your bean is removed from the session.  

This worked for me in Tomcat and let me know when a session was being
timed out, but I found that other application servers, such as
SilverStream, do not behave the same way. The session times out, but the
beans are not unbound and so the method is never called.  From the spec
I don't think invalidating a session requires beans to be unbound if it
does, I think it is a bug in SilverStream's implementation.

Hope this helps,

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 20, 2002 12:27 PM
To: Struts Users Mailing List
Subject: Questions about session timeouts/struts


Hi Folks:

Don't really know much yet about this...I've implemented
sensitive-form
resubmissions by way of tokens within actions but have a question about
when a session times out...

Under Apache (I don't know where yet), I suspect there's a
timer/variable
in some configuration file that says how long a session bean is valid
without any hits before it times out.I also think one can call
explicity "request.getSession().invalidate()" which does the same thing
but
affects all session beans

So here's my question(s):
- Anyone have any advice on how to deal with this programatically?
- When session beans do "timeout" or become "invalid", are they
automatically cleaned up by the system?So in essance if I have a
bean
called "fooBean" that I added via (request.getSession().setAttribute
("fooBean", fooBeanInstance)   AND if the session automatically times
out
(without me calling request.getSession().removeAttribute("fooBean")),
does
the tomcat contain remove "fooBean" from the session scope or will it
still
be there if I call "request.getSession().setAttribute("fooBean")"

I'd like to understand a little bit more on how best to handle/deal with
situations where the session becomes invalid() or times out.   What
happens
to all the beans/data contained for that session.With struts, do all
formbeans with session scope become defunct?

thanks,
Theron


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


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




RE: An url problem

2002-03-20 Thread Robert Nocera


You can set redirect=true to use a redirect instead of a forward.  Then
your users will see your home.jsp in their address bar and a refresh
will refresh home.jsp.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the Vision.  We will do the rest."
  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 20, 2002 10:21 AM
To: [EMAIL PROTECTED]
Subject: An url problem



hello everybody i have the followinfg problem and i have no idea to
solve it
I have an action called cashaction
In my JSP i enter a double in a form then i submit it to the cashaction
It called cashaction.do then forwarde to the home
But in my browser the url is not "home.jsp" but cashaction.do" so when i
refresh
the home it called an other time
cashaction
So how can i do to avoid the problem ?
Thanks for your help
Best Regards



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


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




RE: Help with Oracle dates from Secs passed since 1970

2002-03-13 Thread Robert Nocera

You can just convert seconds into milliseconds (*1000) and then use
java.util.Date(milliseconds) to get your date which is Sep 21, 12:57:34
EDT 2001.


Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 13, 2002 9:58 AM
To: [EMAIL PROTECTED]
Subject: Help with Oracle dates from Secs passed since 1970

If anyone has a ready made solution to convert an UNIX TIME of seconds 
passed 1970 into java or oracle dates, please help.
The number I get is  1001091454 which seconds passed since Jan 1st 1970.

This needs to be converted to a valid oracle date. The answer will be a
date 
in 2001.






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


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


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




RE: simple frames problem, no help in archives

2002-03-12 Thread Robert Nocera

Try it without the  tags.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 12, 2002 2:14 PM
To: Struts Users Mailing List
Subject: RE: simple frames problem, no help in archives

Steve,

Thanks for the insight on how you're managing the workflow with
forms and
frames...it will come in handy later.  Right now, however, I can't even
get
the damn frame source to load, period, from my frameset page, even on
the
initial request.  Do you use the same  "action forward to frameset page,
then action forward for frame source(s)" flow to get the frames
source(s) to
load properly using an Action class?  Or do you load the frame sources
through some other means?

If I could get the frame source to load properly, I'd be fine, as I have
NO
forms on either page, just generated URLs with attached URL query
parameters
in the left-frame nav-bar page.  When a user clicks on one of these, the
correct generated data is displayed in the right-frame view page.

Out of sheer curiosity, if you're having to refresh both frames with
every
request anyway, why not use dynamic includes for the search and results
jsps
in your main.jsp instead?  That's currently how I'm getting my system to
work:  a two-column, single row table with one jsp included on the left
cell, the other on the right cell.  Works fine, but I'm super-annoyed
with
the left side being refreshed with every navigation request (click) the
user
makes, which is why I want the frames version to work BADLY.

Thanks for the help,

Joe

-Original Message-
From: Steve Earl [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 2:28 AM
To: 'Struts Users Mailing List'
Subject: RE: simple frames problem, no help in archives


Joseph,

I'm currently developing a multi-framed web-app using struts and have
had no
end of fun. I agree there isn't a great deal in the archive.

My situation sounds somewhat similar to yours in that I have a
two-framed
page. The upper page has a search form whilst the lower should, when the
search is submitted show either the results of the search or errors if
the
form is filled out incorrectly.

The way we're running things at the moment is to have a main.jsp
containing
a frameset with the two (search and results) jsps within the frameset.
Within the  tag on the search frame I have target="_top". In the
struts-config file, the action mapping for the search page has an action
forward back to the main page.

So, the flow is that when a user submits the form, the form is
validated,
results are read from the database into a results object and we then get
forwarded back to the main.jsp, leading to the redrawing of the two
frames.
To enable this to work we've had to define the search form bean and
results
object in session scope. I also had to write a new  tag to
read
errors from the session rather than from the request and store form
validation errors within the session rather than the normal struts way
of
sticking them in the request. Then, logic within the results.jsp when
rendering the page first checks if there are any errors on the session
and
renders them to the screen if there are. If there are no errors it looks
for
a results object on the session and draws that. If there are neither of
those (as would be expected on the first entry into the page) then the
user
just sees a blank screen.

This method is working at present but it is leading to a great deal of
redrawing. We're using Mozilla as the browser. It's worth noting that if
you're using Netscape then you can set the target frame within your code
in
the Action class, avoiding forwarding back to the main.jsp page and
redrawing everything. This doesn't work with either IE or Mozilla
though.

Hope this helps - if anyone has a cleaner way of doing what I've
described
then let me know!!

regards,

__
Steve Earl


-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:05 PM
To: Struts Users Mailing List
Subject: simple frames problem, no help in archives


Hi all,

This problem is a bit annoying, because I have a fairly straight-forward
solution that inexplicably doesn't work.  As a preface, I have checked
out
everything I could find related to frames in the archive, and nobody
seems
to have encountered this particluar problem.

I have two simple frames, one a navigation bar dynamically generated
from
form data, the other a view frame to show dynamically generated results
when
the user clicks on a link in the nav-bar.  This MUST be implemented as
two
frames, since the nav-bar is a tree-view of database table data (looks
like
a file browser's nav-bar) and shouldn't be refreshed (esp. since we want
to
retain opene

RE: Found Solution to setting server side parm in Javascript BUT....

2002-03-11 Thread Robert Nocera

Theron,

There isn't an easier way because a FormBean is a server-side object.
You might think that your html page has access to it, but it's only
because of the sleight of hand involved in JSP programming.  Since a JSP
is actually a servlet, it is only sending HTML to a browser so your
browser knows nothing of these objects.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 10, 2002 7:21 PM
To: Struts Users Mailing List
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Found Solution to setting server side parm in Javascript
BUT


After spending 2 hours trying to find a solution to this, I found one by
trial and error...
BUT THERE HAS GOT TO BE A BETTER WAY  :-)

Here's what I did but I can't believe it's "this" difficult to do...

Here's my checkfield property that needs to "force a form value to be
updated":

 
  
 

Here's the javascript function:

 function setCurrProductType(inProductType) {
  alert("Setting curr product type to: " + inProductType);
  window.location="SetProperty.jsp?enteredPt="+inProductType;
 }


and here's the SetProperty.jsp
-
<%@ taglib uri="/struts-bean" prefix="bean" %>




<%
 //
 // If they changed the product type on the first page, set it
 // here in the form object...
 //
 String sCurrProductType=request.getParameter("enteredPt");
 psInfo.setCurrProductType(sCurrProductType);
 System.out.println("Current Product Type = " +
psInfo.getCurrProductType()
  + " current page = " + psInfo.getCurrpage());
 psForm.setPsdProductType(psInfo.getCurrProductType());
%>




So in essence, the "forward" tag simply causes control to come back to
the
page I was on...   But in-between, I was able to set a form bean
propertyAgain my problem is the form bean property is not
updated
until you hit the submit button...   In this case, I don't want a submit
to
occur when you change the contents of the dropdown.   Only the property
for
that drop down should change...   After adding this, when I click to go
to
the 4th tab, the action now sees the newly changed value

It works BUT I have to believe there's a better way!!!I open to any
suggestions...



 

theron.kousek

@webmd.net   To: Struts Users Mailing
List  
 
<[EMAIL PROTECTED]>   
03/10/02 cc:

02:32 PM Subject: setting server
side parm in Javascript?   
Please

respond to

Struts Users

Mailing List

 

 





Hi Folks:

I'm doing a mimic-JTabbedPane approach.   I have a screen with 5 tabs.
I
am using 1 form object and 5 action mappings...

On tab 4, I'd like to detect changes made to a field on tab 1. I
notice
I can change the field on tab 1 but tab 4 does not know about until the
form is submitted.I can't submit the form...

I'd like to have a Javascript handler that implements the onchange() and
somehow sets a session attribute or some kind of trigger that tells tab
4
to "reload" itself when this field on tab 1 has changed.I notice if
I
change these values, the form object will not get the new values until
you
hit submit.Having the javascript function call submit is not an
option
either...   Any ideas on how best to do this??

If I could access my form-bean directly within the Javascript method,
that
would be an option to (as I could call the set method on the form
object)
but I am not sure if the javascript can access the form object directly
and
call a set method?

thanks,
Theron


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




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


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




RE: redirection from an action/ refreshing page

2002-03-07 Thread Robert Nocera

You can use redirect="false" to make it a forward, which is what you
want most of the time.  I believe that false is the default value.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Yu, Yanhui [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 1:58 PM
To: Struts Users Mailing List
Subject: RE: redirection from an action/ refreshing page

Hi, 

I am new to Struts, and so my question maybe too simple:  Please help.

I notice redirect is used often, does that mean I have to put things in
session instead of request?  If it is true, can I use redirect="false"
(assuming this way I am using forward instead of sendRedirect?) so I can
put
more things in the request?

Thanks for any help,
Yanhui





-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 4:30 PM
To: Struts Users Mailing List
Subject: Re: redirection from an action/ refreshing page


Use:





[EMAIL PROTECTED] wrote:

> addendum to question.  I meant to write that we do
>
> return mapping.findForward("success");
>
> not
>
> return new ActionForward(mapping.findFoward("success"));
>
> that was a typo
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: redirection from an action/ refreshing page
>
> After we have finished handling the form in our action, we forward the
> request on to the next page using
>
> return new ActionForward(mapping.findForward("success"));
>
> where success is defined in the action in struts-config.xml using
>   
>
> However, after the page has been forwarded, the URL displayed in the
web
> browser address page is the path to the previous action.  Namely
>
> /Save.do
>
> even though we are on the successpage.jsp.
>
> If this page is refreshed (using IE 5.5, haven't tried it on other
> browsers), it prompts me for whether I want to resubmit the form.
However,
> there is no form on the successpage.jsp.
>
> So, I am wondering, does anyone know how to prevent this from
happening?
>
> --
> 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]>

--
~~Mark Woon~~~
God put me on this Earth to accomplish a certain number of things.
Right now, I am so far behind I shall never die.



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


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




RE: null value for a nested property

2002-03-07 Thread Robert Nocera

David,

I find it's best to use a form bean that is different from your data
object, so that your get methods on your form object can return an empty
string if null instead of actually returning a null value.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: David Boardman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 12:49 PM
To: Struts Users Mailing List
Subject: null value for a nested property

I currently am using an  tag on a form to display the name of
a
state.  The tags looks like:




The problem is that ocassionally the state field on the address bean is
null.  When this occurs the PropertyUtils.getNestedProperty() method
throws
an IllegalArgumentException which causes my jsp to break.  To circumvent
this problem I have written my own tag that extends BaseFieldTag and
overrides the doStartTag() method.  I basically perform the same
functions
as the BaseFieldTag.doStartTag() method, except that instead of the
following call:

Object value = RequestUtils.lookup(pageContext, name, property,
null);

to get the value I catch the IllegalArgumentException and set the return
value to an empty string:

  try{
valueObject = RequestUtils.lookup(pageContext, name,
property, null);
}catch(IllegalArgumentException e){
//This exception indicates that one of the nested properties
returned null
//we want to set the value to null and not throw the
exception
out
//to the jsp
valueObject = "";
}

I am wondering if there is a better way of dealing with this problem.  I
don't like the solution I am using, but I can't think of anything else.
How
about adding an attribute to the form tags that specify how null
property
values should be handled?

Thanks for your help,

Dave


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


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




RE: ActionForward question

2002-03-01 Thread Robert Nocera

Your best bet is to set up an intermediate page that uses Javascript to
do automatic refreshes. 

There were a couple other suggestions on this list a little while ago.
One was to set up a page that lists the transactions in progress and
their status and have the user refresh the page themselves.

You can't use http to push stuff out to a browser, only respond to
requests, and once you respond, you're stuck waiting for the user to
make another request.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Thomas Bednarz [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 01, 2002 11:58 AM
To: struts user list
Subject: ActionForward question

Hi,

Is it possible to send pages to a browser depending on the processing
status
of an action? Lets say you have to process a long operation in the
background such as a credit card validation or the like, is it possible
to
show the user an intermediate page telling him that some work is in
progress
and then show the result page when it is generated?

In the Action class it looks like this:

// test if session is valid
af = super.validateForm(form, mapping, request);
if (af != null) return af;
// test if a form has already been delivered
if ((ContainerName == null) || (ContainerName.length() < 1))
//show
form
{
saveToken(request);
return (new
ActionForward("/Templates/Forms/ShowEnumNTGGForm.vm"));
}

if (this.isTokenValid(request))
{
resetToken(request);
//


***
//   START PROCESSING HERE THIS COULD LAST 30 SECONDS OR
MORE
//   IF I ADD SOMETHING LIKE A new ActionForward("some
status
message URL"); THE
   //FOLLOWING CODE WILL EXECUTE BUT THE FORWARD AT THE
BOTTOM
WILL NEVER
   // REACH THE BROWSER !
   //


***
try
{
container = getNTContainer("Domain", ContainerName,
request);
request.setAttribute("NTContainer", container);
} catch (SmartSolException e)
{
errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("error.exception.smartsol",
new
Integer(e.ErrorCode).toString(), e.File ,e.ErrorMsg));
}
} else
{
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("error.BePatient"));
}
// Report any errors we have discovered back to the original
form
af = super.processErrors(errors, mapping, request);
if (af != null)
{
log.debug("finished perform with errors.");
return (af);
}
// Forward control to the specified success URI
log.debug("finished perform with success");
return (new ActionForward("/Templates/NTAccounts/EnumNTGG.vm"));
---   end quote --

How can this problem be solved?

Many thanks!

Thomas


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


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




RE: How can I get rid of the port on redirects.

2002-02-26 Thread Robert Nocera

Bill,

If you don't absolutely need to redirect then set the flag to false.

If you do, getting rid of the base tag might help as per:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05647.html


Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Bill Clinton [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 26, 2002 2:03 PM
To: Struts Users Mailing List
Subject: How can I get rid of the port on redirects.

Hello,

I am running on port 8060, but the outside world sees my my application 
through a proxy run on port 80.  When I set a forward to an action and 
use the redirect=true flag, the port "8060" gets tagged on to the 
redirect and it times out since this port is not open on the proxy.  I 
am trying to look for somewhere in the struts source code where I can 
strip out the refernce to this port on redirects.  Can someone please 
show me where I would need to modify the source?  I am unable to find
it.

Bill


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


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




RE: iterate tag to repeat for a collection of individula objects

2002-02-26 Thread Robert Nocera

In your iterate tag, name should be the name of the form bean, and
property should be the name of the form variable that contains the list.
You also probably need the type attribute to specify what type of
objects the list contains.

In the code you provided it's looking for a form bean called
"clientList" that contains a collection called "clients".

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Jay Milam [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 26, 2002 9:53 AM
To: [EMAIL PROTECTED]
Subject: iterate tag to repeat for a collection of individula objects




I need to have a struts logic:iterate tag, which has to repeat a set of
tag
for a collection of individual objects.

I have a .jsp page , which contains Logic iterate tag

  
  
  
  

Where 'clientList' is a bean which contain 'clients'(ArrayList) as
member.

The form bean for this .jsp contains 'clientList' as a member.

In the action class  the following step are done
for i=1 to x
1. Create new Client object. ( Where Client object contains,
'clientType' 
and 'dateOfBirth' as members)
2. Add that Client object to the 'clientList'
next i


The scope in the action-mapping for this action is set to 'session' in
the 
struts config file.

I am getting 'cannot find bean clientList in scope null: 
javax.servlet.jsp.JspException.






_
Chat with friends online, try MSN Messenger: http://messenger.msn.com

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


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




RE: ActionForm scoping problems?

2002-02-25 Thread Robert Nocera

This could be off-base, but I think you'll have better results if you
change the case of your form-bean variable name from "BillingIDForm" to
"billingIDForm".  I think it may be using a static class BillingIDForm
and not creating an instance of the class.  Change all references on the
JSP page to "billingIDForm" and the mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 24, 2002 6:02 PM
To: Struts Users Mailing List
Subject: ActionForm scoping problems?


I have an action as such:
---


And I have an entry point JSP which invokes actions and such

I have a post
My BillingIDActionForm action simply loads data into the BillingIDForm
and
saves an attribute in it.

The BillingIDActionForm::perform() then
calls return (mapping.findForward("success"));

Where success maps to:


The "submit" for BillIDForm.jsp is 
where handleBillingIDSubmit maps to:
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:



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




RE: Development Environment

2002-02-21 Thread Robert Nocera

JBuilder 6 on Windows NT
And 
NetBeans on Windows 2000

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 12:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment

Hello,

Quick question, what is the preferred development environment that you
are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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


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




RE: Design question about ActionForm's validate method

2002-02-05 Thread Robert Nocera


Direct the user to an action that isn't the action associated with the
page in question, even if all that action does is forward to the JSP
page.  Generally the action's associated with a JSP page get called from
that JSP page.

ActionA forwards to B.JSP, B.JSP submits to ActionB and so on...

Alternately provide a hidden form variable in your page, in your
validation method, check for it, if it's not there, don't continue
validating as the user did not just submit the page.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Sid Stuart [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 05, 2002 12:25 PM
To: Struts Users Mailing List
Subject: Design question about ActionForm's validate method

Hi,

I've stumbled across a subtle problem/design question that I don't see
mentioned in the documentation.

The ActionForm's validate method can be configured to verify form data
from a page and generate error messages which may then be displayed on
the page for the user to see. This works fine when the user has accessed
the page by specifying a JSP file in the URL. When the user accesses the
page by calling the Action directly though, the validate method is
called before the user ever sees the page, much less inputs valid data
to the form. This leads to an unfortunate display of unwarranted error
messages.

It would be nice if the documentation would provide a rule such as:
If one plans on the user calling the Action directly in the URL  then
one should not use the automatic validation provided by ActionForm.

Further, as having two different procedures to generate a page can lead
to subtle errors, one should decide whether a page will be accessed as a
JSP or as an Action and design for the one scenario. The simplest (and
safest) design rule will be to access all pages through either one
mechanism or the other.

Comments?

Sid Stuart




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




RE: redirect vs forward

2002-01-24 Thread Robert Nocera

A redirect tells the browser to load a new page whereas a forward sends
the current request on to a new action or page.  The big difference is
that in a redirect the browser is making a *new* request, in a forward,
the current request is carried on to wherever with all the attributes of
the original request.  

Another consideration is that when a redirect is done, the client now
knows where they were redirected to, whereas multiple forwards can be
performed and the client only knows about the original request that was
made.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Brian Holzer [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 3:46 PM
To: [EMAIL PROTECTED]
Subject: redirect vs forward

Hey there,
I am kind of confused about what the difference is between a forward
and a redirect.  In reading the documentation on the logic:forward and
redirect tags. With the forward tag, whether a forward or redirect is
sent, is determined by the redirect param in the  definition.
The redirect tag sends a redirect to the browser, but what is the
difference between the two?  Why would I want to define an Actions
forward so that it is sent as a redirect?  Maybe the answer will be
evident to me once I know the difference b/t the two.  Can someone shed
some light on this for me?

Brian


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


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




RE: persistent authentication

2002-01-16 Thread Robert Nocera

You could:
1. Do the check in a base class that extends action and have all your
actions extend that base class.

2. Use Container managed security to handle it all.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Robert Tyler Retzlaff [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 16, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: persistent authentication

One of the advantages of the MVC approach is that the controller is 
able to provide authentication verification for each request to a 
resource in the application.

Does struts support this?  If so how?  Currently I'm 'checking' 
authentication in each of my Action classes that extend Action
and doing the same for jsp pages via a custom tag.  It's a bit 
redundant.

Examples are good.

Thanks

rob

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


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




RE: controller servlet session lost

2002-01-04 Thread Robert Nocera


I believe you should be able to configure load balancing so that it is
"sticky" and sends the same client to the same webserver each time.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Narendranatha R Sajjala [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 04, 2002 12:45 PM
To: 'Struts Users Mailing List'
Subject: controller servlet session lost

Hi,
we are using 5 web servers WeblogicEnterprice where all my jsp's and
servlets are residing,
and we have a cluster of WLS for EJB's. Load balancing on webservers is
done
by third party
software. Now the problem is first time user hits the website the load
balancer transfers the request to
one webserver where controller servlet is invoked  but next request from
the
same user may transferred to another webserver based on 
load on loadbalence at that time ,i am loosing the session. is there any
solution for this problem.
i don't want to cluster webservers.

narendra
[EMAIL PROTECTED]

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


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




RE: Creating reports in PDF format

2001-12-27 Thread Robert Nocera

Try iText, it's a Java-PDF library.
http://www.lowagie.com/iText


Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Ajay Chitre [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, December 27, 2001 12:25 PM
To: [EMAIL PROTECTED]
Subject: Creating reports in PDF format

Hello,

I have created a struts based web application which, among other things,
allows users to create reports based on certain selection criteria.  A
new
user requirement has come up which requires the reports to be displayed
in PDF format (and Excel).  Has anybody done anything similar in the
past?
 I would greatly appreciate your help.

I recall seeing emails regarding a simillar issue, but I can't find them
in the mail archives!  Please help.

Thanks.



Ajay Chitre

Diligent Team, Inc.
(Where Diligent People Work as a Team)

http://www.DiligentTeam.com



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


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




RE: Using Struts and Flash Together, how is it done?

2001-11-20 Thread Robert Nocera


You might want to look at the action script reference and guide on
Macromedia's site, it has a lot of good info on integrating Flash and
web applications.  One way is to have your servlets (or Struts
application) return xml and process that inside of your flash movie.  

If you don't want to go to that extreme, you can just include your flash
movies in the JSP pages that Struts returns.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 20, 2001 8:42 PM
To: [EMAIL PROTECTED]
Subject: Using Struts and Flash Together, how is it done?

Hello Ladies and Gentlemen

Can someone give me some pointers on how to integrate Flash and Struts 
or give me a reference to a website or books which explain how to use 
them together.

Cheers

Tony


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


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




RE: Formatting a float for display

2001-11-14 Thread Robert Nocera

You could have a point about the MVC model, in fact, I am not entirely
onboard with JSP as an MVC model anyway, but, that being said, I usually
consider the form beans as part of the view in a struts application.  In
my applications the form beans generally encapsulate a data bean and I
try to keep separation that way.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 14, 2001 11:23 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Formatting a float for display

Robert,

Thanks for your response.  Actually the way that I currently have it
coded is the way that you have described.  I created a
getDisplayValue(),
but this just doesn't seem right to me.  My understanding about the MVC
architecture should allow for your display to not have to be tied to
your
model.  If my formBean is the one responsible for returning the data
type
for my model, then I am violating this principal.  Maybe it is a minor
detail, but that was the first thought that came to my mind.

Thoughts

Jeff

 

-----Original Message-
From: Robert Nocera
To: 'Struts Users Mailing List'
Sent: 11/14/2001 11:11 AM
Subject: RE: Formatting a float for display

Did you try only changing the get method to return the formatted string?
Or just creating a get method called getFloatFormatted and using that
only to display the value?

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 
-Original Message-
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 14, 2001 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: Formatting a float for display

All,
My guess is there is some easy way to do this.  I have a formBean
that
has a get and a set for a value that is a float.  I want to display this
float in a format of #,###.##.  I am using java.text.DecimalFormat and
that
works pretty good except it returns a String.  So if I change my get and
set
to return a String then I will have to convert that back in my action
class
to a float and Float.parse("#,###.##") will throw a format exception.
So I
am wondering if there is any utils or good practices to have your
formBean
display a float with formatting and then get that value back in the
action
class in a float data type.

Thanks

Jeff Krueger



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


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

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


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




RE: request scope and forms

2001-11-14 Thread Robert Nocera

If I understood your question correction, you probably want to use a
session scope bean.  In your case when the JSP is submitted each time a
new form bean is created because at that point it is a new request, not
a forward.

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 

-Original Message-
From: Rob Breeds [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 14, 2001 11:03 AM
To: Struts Users Mailing List
Subject: request scope and forms


I'm getting stuck with request scope and ActionForm objects not sticking
around across requests.

If I have a jsp that has an input text field called name that populates
a
corresponding field in an ActionForm called name, then that field gets
populated.

If the Action associated with this ActionForm then takes that name value
and adds it a different property in the ActionForm (say to a Vector) and
then forwards to the SAME input jsp again, why is it that a new
ActionForm
object is instantiated every time (according to the log), such that
theActionForm never gets more than one String added to the Vector?

I was under the impression that if I forwarded, any ActionForm passed to
the Action would be persisted in the request.

Thanks

Rob Breeds



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


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




RE: Formatting a float for display

2001-11-14 Thread Robert Nocera

Did you try only changing the get method to return the formatted string?
Or just creating a get method called getFloatFormatted and using that
only to display the value?

Robert Nocera
New England Open Solutions
www.neosllc.com
"You supply the vision, we'll do the rest."
 
-Original Message-
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 14, 2001 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: Formatting a float for display

All,
My guess is there is some easy way to do this.  I have a formBean
that
has a get and a set for a value that is a float.  I want to display this
float in a format of #,###.##.  I am using java.text.DecimalFormat and
that
works pretty good except it returns a String.  So if I change my get and
set
to return a String then I will have to convert that back in my action
class
to a float and Float.parse("#,###.##") will throw a format exception.
So I
am wondering if there is any utils or good practices to have your
formBean
display a float with formatting and then get that value back in the
action
class in a float data type.

Thanks

Jeff Krueger



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