ActionMessage and ActionMessages Problem

2004-09-25 Thread Satish Talim
Hello,

I am using Struts 1.2.4 on JBoss 3.2.5.

In my ActionForm validate method, I have the following code -
ActionErrors errors = new ActionErrors();
ActionMessages messages = new ActionMessages();
ActionMessage msg = null;
if (getLoginID() == null || getLoginID().length() < 1)
{
  msg = new ActionMessage("errors.loginID.required");
  messages.add(ActionMessages.GLOBAL_MESSAGE, msg);
  errors.add(ActionMessages.GLOBAL_MESSAGE, msg);
}
request.setAttribute("messages", messages);
return errors;

I did this, since I don't want to use ActionErrors and ActionError (as these are 
deprecated). Now in my JSP view I want to display the message, but am not clear what I 
need to do. I tried the following, but it does not work ie. no messages are displayed 
on the screen.
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>

  


What am I doing wrong and what's the right solution?

All help most appreciated.

Regards,

Satish Talim



Re: Html-el disabled property error

2004-09-25 Thread Zoran Avtarovski
Thanks Bill,

But that is exactly what was causing the error in the first place. All the
other variations have been an attempt to get it to work. What I wanted to
know is anybody else having problems with this.

To provide more contextual info, the disabled property works fine with the
standard html:text tag. Is it me, jrun or the tags that are at playing up.

Z.

> Zoran Avtarovski wrote:
> Maybe I am missing something but is there some reason that you can't use:
> 
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
> 
> 
> 
> -Bill Siggelkow
> 
>> Hi all,
>> 
>> I'm building my first webapp using srtuts-el and I've come across a strange
>> error. When creating a form using the  tag  and I set the
>> disabled parameter to true as follows:
>> 
>> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
>> 
>> 
>> 
>> I get the following error from jrun4:
>> 
>> 
>>  jrunx.compiler.DefaultCFE: Compiler errors:
>> Found 1 semantic error compiling
>> "/Applications/JRun4/servers/Vision/WebRoot/WEB-INF/jsp/jrun__admin__formSch
>> eduleInc2ejsp1a.java":
>> 
>> 53. _tag0.setDisabled(__constantTable.getString(1));
>> ^-^
>> *** Semantic Error: No applicable overload for the method named
>> "setDisabled" was found in type
>> "org.apache.struts.taglib.html.BaseHandlerTag". Perhaps you wanted the
>> overloaded version "void setDisabled(boolean $1);" instead?
>> 
>>  Is a a Jrun specific problem and if so is there a work-around or I am I
>> missing something obvious?
>> 
>> Z.
> 



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



Re: Html-el disabled property error

2004-09-25 Thread Zoran Avtarovski
OK, I had a good look at the source and it should be working. Can somebody
please explain to me why this isn't doing what it's supposed to do?

I hate the fact that I have to use the html tags when I've been able to use
EL for everything else.

Zoran 





> Zoran Avtarovski wrote:
> Maybe I am missing something but is there some reason that you can't use:
> 
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
> 
> 
> 
> -Bill Siggelkow
> 
>> Hi all,
>> 
>> I'm building my first webapp using srtuts-el and I've come across a strange
>> error. When creating a form using the  tag  and I set the
>> disabled parameter to true as follows:
>> 
>> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
>> 
>> 
>> 
>> I get the following error from jrun4:
>> 
>> 
>>  jrunx.compiler.DefaultCFE: Compiler errors:
>> Found 1 semantic error compiling
>> "/Applications/JRun4/servers/Vision/WebRoot/WEB-INF/jsp/jrun__admin__formSch
>> eduleInc2ejsp1a.java":
>> 
>> 53. _tag0.setDisabled(__constantTable.getString(1));
>> ^-^
>> *** Semantic Error: No applicable overload for the method named
>> "setDisabled" was found in type
>> "org.apache.struts.taglib.html.BaseHandlerTag". Perhaps you wanted the
>> overloaded version "void setDisabled(boolean $1);" instead?
>> 
>>  Is a a Jrun specific problem and if so is there a work-around or I am I
>> missing something obvious?
>> 
>> Z.
> 



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



Re: ActionMessage and ActionMessages Problem

2004-09-25 Thread Michael McGrady
   
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   
   
   
   
   
   
   
   

Satish Talim wrote:
Hello,
I am using Struts 1.2.4 on JBoss 3.2.5.
In my ActionForm validate method, I have the following code -
   ActionErrors errors = new ActionErrors();
   ActionMessages messages = new ActionMessages();
   ActionMessage msg = null;
   if (getLoginID() == null || getLoginID().length() < 1)
   {
 msg = new ActionMessage("errors.loginID.required");
 messages.add(ActionMessages.GLOBAL_MESSAGE, msg);
 errors.add(ActionMessages.GLOBAL_MESSAGE, msg);
   }
   request.setAttribute("messages", messages);
   return errors;
I did this, since I don't want to use ActionErrors and ActionError (as these are 
deprecated). Now in my JSP view I want to display the message, but am not clear what I 
need to do. I tried the following, but it does not work ie. no messages are displayed 
on the screen.
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>
   
 
   
What am I doing wrong and what's the right solution?
All help most appreciated.
Regards,
Satish Talim
 


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


JSTL problem

2004-09-25 Thread M. Onur Tokan
Hi,

I am in a strange confusion about Beans and JSP communication. For
example I have the following code that displays list of musics.
'musiclist' is a Collection variable which is set in the ActionClass
on the session scope. The problem is; How can  tag
recognises musiclist variable. Should'nt it be something  like






















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



RE: error in strutsel-exercise-taglib (resend - list never forwarded it)

2004-09-25 Thread David G. Friedman
John,

Another David here.  I'm learning how to use the Expression Language 'stuff'
in Tomcat 5.0.X (.28 actually) under Struts v1.2.4 and I'm NOT using
Struts-El.  I don't need it.  I'm not sure about HashMaps as I haven't used
them yet, but I can access my variables without Struts-el this way:

My actual for in struts-config.xml is named "uploadForm".  I'm sorry about
the stupid field called "name" but hey, I'm playing around with it! In my
upload.jsp page, I can access the members of the uploadForm either the old
way:

*** Keep in mind I still have a tag
***  so the
*** below html:text tag works properly
*** and pulls the form bean in that is
*** associated with the /upload action.



OR I can do it using the JSP 2.0 expression language syntax:


Again, I DO NOT use Struts-el, just the stock struts.  I do have one change
in my WEB-INF/web.xml file.  Instead of having:



I changed it to:

http://java.sun.com/xml/ns/j2ee"; version="2.4">

That change, after restarting my webapp, allowed me to use expression
language variables in any of my JSP files.

I hope this information helps you.

Regards,
David

-Original Message-
From: John C Cartwright [mailto:[EMAIL PROTECTED]
Sent: Friday, September 24, 2004 7:19 PM
To: Struts Users Mailing List
Subject: Re: error in strutsel-exercise-taglib


Thanks for your reply, David.  I'm not sure that I understand though.  I
am using tomcat 5.0.x and JSP2.0. However, when I change the taglib
directive to:

<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"%>

and try something like:



(where images is a HashMap in request scope), I get an error.  Indeed,
the documentation for the html:img taglib specifies a RTExpr.

Can you clarify for me?

Thanks!

-- john


Karr, David wrote:
> You don't need to use Struts-EL with Tomcat 5, if you're using JSP 2.0.
> In fact, it won't work.  I don't know what this particular exception is,
> but you can avoid this situation entirely by just not doing it.

--
=
John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
[EMAIL PROTECTED]


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



Re: ActionMessage and ActionMessages Problem

2004-09-25 Thread Michael McGrady
Sorry, left out the "ERRORS" sort of header.
Michael McGrady
   

   
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   
   
   
   
   
   
   
   

Satish Talim wrote:
Hello,
I am using Struts 1.2.4 on JBoss 3.2.5.
In my ActionForm validate method, I have the following code -
   ActionErrors errors = new ActionErrors();
   ActionMessages messages = new ActionMessages();
   ActionMessage msg = null;
   if (getLoginID() == null || getLoginID().length() < 1)
   {
 msg = new ActionMessage("errors.loginID.required");
 messages.add(ActionMessages.GLOBAL_MESSAGE, msg);
 errors.add(ActionMessages.GLOBAL_MESSAGE, msg);
   }
   request.setAttribute("messages", messages);
   return errors;
I did this, since I don't want to use ActionErrors and ActionError (as these are 
deprecated). Now in my JSP view I want to display the message, but am not clear what I 
need to do. I tried the following, but it does not work ie. no messages are displayed 
on the screen.
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>
   
 
   
What am I doing wrong and what's the right solution?
All help most appreciated.
Regards,
Satish Talim
 


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


[OT] jsf dataTable scope.

2004-09-25 Thread Mark Lowe
I know this may annoy some folk as its not directly a struts question. 
But JSF is used with struts, bla , bla..

Does any one have any thoughts on scoping a List backed backing bean to 
request and being able to maintain the list without the Bean being 
reinstantated on each post..

public class HouseBean {

private List roomList;
public HouseBean() {
this.roomList = new ArrayList();
}
public List getRooms() {
return rooms;
}
//also tried using void method
public String addRoomAction() {
this.roomList.add(
new RoomBean(
"Room "+ Integer.toString(roomList.size())
);
return Outcomes.SUCCESS;
}
}






The first item works but then the bean is instantiated and I get a new 
List..

DO i need to scope to session or is there something i've missed? I've 
tried lazy list but the basic problem is that the Bean is instantiated 
everytime the addRoomAction is run..

Mark

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


Re: JSTL problem

2004-09-25 Thread Mark Lowe
If you're using JSTL in struts all the object will be available without 
drilling through the scopes.

In straight JSTL you'd use sessionScope. But as you're using struts you 
dont need to and you can decide what you want to scope to in you java 
or configuration of the ActionServlet..

HTH Mark
On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:
Hi,
I am in a strange confusion about Beans and JSP communication. For
example I have the following code that displays list of musics.
'musiclist' is a Collection variable which is set in the ActionClass
on the session scope. The problem is; How can  tag
recognises musiclist variable. Should'nt it be something  like

--
Regards,
M. Onur Tokan






















-
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: ActionMessage and ActionMessages Problem

2004-09-25 Thread Mark Lowe
Satish
ActionErrors isn't deprecated, ActionError is...
http://struts.apache.org/api/org/apache/struts/action/ActionErrors.html
ActionErrors errors = new ActionErrors();
errors.add("myproperty" , new ActionMessage(...));
return errors;
And then personally i prefer

But there are good reasons for preferring html:messages as you can hide 
whole sections of unwanted html using them..

Mark
On 25 Sep 2004, at 17:17, Michael McGrady wrote:
Sorry, left out the "ERRORS" sort of header.
Michael McGrady
   

   
   
   
   
   
   
   
   
   
   
   
   

   
   
   
   
   
   
   
   
   
   
   

Satish Talim wrote:
Hello,
I am using Struts 1.2.4 on JBoss 3.2.5.
In my ActionForm validate method, I have the following code -
   ActionErrors errors = new ActionErrors();
   ActionMessages messages = new ActionMessages();
   ActionMessage msg = null;
   if (getLoginID() == null || getLoginID().length() < 1)
   {
 msg = new ActionMessage("errors.loginID.required");
 messages.add(ActionMessages.GLOBAL_MESSAGE, msg);
 errors.add(ActionMessages.GLOBAL_MESSAGE, msg);
   }
   request.setAttribute("messages", messages);
   return errors;
I did this, since I don't want to use ActionErrors and ActionError 
(as these are deprecated). Now in my JSP view I want to display the 
message, but am not clear what I need to do. I tried the following, 
but it does not work ie. no messages are displayed on the screen.
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" 
%>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" 
%>
   
 
   

What am I doing wrong and what's the right solution?
All help most appreciated.
Regards,
Satish Talim


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


Session / Form Issue

2004-09-25 Thread Greg Preston
All,

 

I have recently upgraded to Struts distribution 1.24 and am having a
problem I can't explain.  I have a Action that ends up calling a
business class which returns an Form.  If I place the Form in the
request object the subsequently called JSP page (USER.JSP) can render
the content via  tags.  If I place it in the session that
same JSP page will not render any data in the  tags however
will render the same data if the  tags are used.  I've been
using Struts for awhile and think I've got a handle on how its to work,
but I'm at my wits end over this.  Code below.  Thanks in advance.
-Greg

 

 

USER.JSP:

 

  //** This returns
data **//

 



 





Full name:

  //**
This does not **//



  ..

  ..



 



 

 

Struts-Config.xml

..

 









   

 

...

 

 

Greg Preston| IT Business Solutions |Intervoice, Inc. - Dallas, Texas |
(t) 972.454.8871 (c) 214.405.8871| [EMAIL PROTECTED]

 



Re: Session / Form Issue

2004-09-25 Thread Mark Lowe
By virtue of the properties being in the form you don't need to have it 
in the name attribute.. At the moment your html:text does this

userForm.getUserForm().getFullname();
try 
Which will be doing userForm.getFullname();
Mark
On 25 Sep 2004, at 13:53, Greg Preston wrote:
All,

I have recently upgraded to Struts distribution 1.24 and am having a
problem I can't explain.  I have a Action that ends up calling a
business class which returns an Form.  If I place the Form in the
request object the subsequently called JSP page (USER.JSP) can render
the content via  tags.  If I place it in the session that
same JSP page will not render any data in the  tags however
will render the same data if the  tags are used.  I've been
using Struts for awhile and think I've got a handle on how its to work,
but I'm at my wits end over this.  Code below.  Thanks in advance.
-Greg


USER.JSP:

  //** This returns
data **//





Full name:
  //**
This does not **//

  ..
  ..





Struts-Config.xml
..
 
path="/fetchResellerProfile"
name="UserForm"
scope="session"
validate="false"
type="com.intv.it.onlinereports.action.FetchResellerProfileAction">





 

...


Greg Preston| IT Business Solutions |Intervoice, Inc. - Dallas, Texas |
(t) 972.454.8871 (c) 214.405.8871| [EMAIL PROTECTED]


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


Session Customization

2004-09-25 Thread Juan B. Rodriguez
Hello everyone, I'm just starting out with Java/Struts from a previous 
development environment.

I would like to customize the default session behaviour by doing the 
following:

1. Customized Session Id
I want to generate my own id (mostly as a cookie, I don't think I'd like 
to encourage URL rewriting).
This id will be signed as to prevent any tampering, using a secret token 
message digest.

2. Database storage
I'd like the session id and corresponding name/value pairs to be stored 
in a backend database, rather than in the container memory (except 
perhaps for some sort of caching).

So, now I'm unsure about the best way to proceed
1) Filters ?
I've been looking into filters to accomplish. Read some articles that 
show something like what I need, but there's a lot of coding involved. 
I'd really like to adhere to the KISS principle here.

2) Replacing ActionServlet, Wrapping Response/Request/Session objects
Looks like a possibility, I've yet to get a picture of how this might work.
3) Custom Session
Write my own classes that would substitue for req.GetSession.
I'd really appreciate your input on how you're approaching this issues 
with the experience you have.

Thanks in advance.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: error in strutsel-exercise-taglib

2004-09-25 Thread David G. Friedman
John,

Another David here.  I'm learning how to use the Expression Language 'stuff'
in Tomcat 5.0.X (.28 actually) under Struts v1.2.4 and I'm NOT using
Struts-El.  I don't need it.  I'm not sure about HashMaps as I haven't used
them yet, but I can access my variables without Struts-el this way:

My actual for in struts-config.xml is named "uploadForm".  I'm sorry about
the stupid field called "name" but hey, I'm playing around with it! In my
upload.jsp page, I can access the members of the uploadForm either the old
way:

*** Keep in mind I still have a tag
***  so the
*** below html:text tag works properly
*** and pulls the form bean in that is
*** associated with the /upload action.



OR I can do it using the JSP 2.0 expression language syntax:


Again, I DO NOT use Struts-el, just the stock struts.  I do have one change
in my WEB-INF/web.xml file.  Instead of having:



I changed it to:

http://java.sun.com/xml/ns/j2ee"; version="2.4">

That change, after restarting my webapp, allowed me to use expression
language variables in any of my JSP files.

I hope this information helps you.

Regards,
David

-Original Message-
From: John C Cartwright [mailto:[EMAIL PROTECTED]
Sent: Friday, September 24, 2004 7:19 PM
To: Struts Users Mailing List
Subject: Re: error in strutsel-exercise-taglib


Thanks for your reply, David.  I'm not sure that I understand though.  I
am using tomcat 5.0.x and JSP2.0. However, when I change the taglib
directive to:

<%@ taglib prefix="html" uri="http://jakarta.apache.org/struts/tags-html"%>

and try something like:



(where images is a HashMap in request scope), I get an error.  Indeed,
the documentation for the html:img taglib specifies a RTExpr.

Can you clarify for me?

Thanks!

-- john


Karr, David wrote:
> You don't need to use Struts-EL with Tomcat 5, if you're using JSP 2.0.
> In fact, it won't work.  I don't know what this particular exception is,
> but you can avoid this situation entirely by just not doing it.

--
=
John Cartwright
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6284
[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: JSTL problem

2004-09-25 Thread Chris
> If you're using JSTL in struts all the object will be available without 
> drilling through the scopes.

How JSTL and Struts communicate each other?
Could anybody please explain this *mysterious* thing detailly?
I really want to know the black box behind JSP using JSTL 

and Struts taglibs , but the servlet code compiled from 
JSP is too hard to explore.

Regards.
Chris

- Original Message - 
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, September 25, 2004 11:29 PM
Subject: Re: JSTL problem


> If you're using JSTL in struts all the object will be available without 
> drilling through the scopes.
> 
> In straight JSTL you'd use sessionScope. But as you're using struts you 
> dont need to and you can decide what you want to scope to in you java 
> or configuration of the ActionServlet..
> 
> HTH Mark
> 
> On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:
> 


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



findForward nto going to correct place

2004-09-25 Thread Tom Holmes Jr.
I've been working on this Member pages for a short time now, and it used 
to be that when the data didn't validate from the formbean, it would 
return to the correct page to allow the user to fix the data.  When the 
data is entered correctly, the data does gets filed to the database, and 
 the user is returned to the correct page saying that data has been 
filed.Here is the action mapping:




This hasn't changed at all, and it used to work fine.  And it still does 
work if the return is "success".  But, when I return "failure", I get 
re-directed to some other page that doesn't exist in this directory.  I 
don't know why it would start doing that all of a sudden?

Any help would be much appreciated.  Thanks!
 Tom
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSTL problem

2004-09-25 Thread Mark Lowe
Not sure why you have this burning desire to know but JSTL works as 
such outside of struts

<%@ page isELIgnored="false" %>
<%
request.getSession().setAttribute("foo","foo");
%>


${foo}


Both struts and JSTL tags look through the available scopes and choose 
the one that appears higher up in the hierarchy.

page, request, session,application
Mark
On 25 Sep 2004, at 18:20, Chris wrote:
If you're using JSTL in struts all the object will be available 
without
drilling through the scopes.
How JSTL and Struts communicate each other?
Could anybody please explain this *mysterious* thing detailly?
I really want to know the black box behind JSP using JSTL
and Struts taglibs , but the servlet code compiled from
JSP is too hard to explore.
Regards.
Chris
- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, September 25, 2004 11:29 PM
Subject: Re: JSTL problem

If you're using JSTL in struts all the object will be available 
without
drilling through the scopes.

In straight JSTL you'd use sessionScope. But as you're using struts 
you
dont need to and you can decide what you want to scope to in you java
or configuration of the ActionServlet..

HTH Mark
On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:

-
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: JSTL problem

2004-09-25 Thread Mark Lowe
Here's a better example
<%@ page isELIgnored="false" %>
<%
pageContext.setAttribute("foo","page context");
request.setAttribute("foo","request context");
session.setAttribute("foo","session context");
application.setAttribute("foo","application context");
%>


${foo}


If you're not on tomcat 5 then the usual  
should do the same.

On 25 Sep 2004, at 19:36, Mark Lowe wrote:
Not sure why you have this burning desire to know but JSTL works as 
such outside of struts

<%@ page isELIgnored="false" %>
<%
request.getSession().setAttribute("foo","foo");
%>


${foo}


Both struts and JSTL tags look through the available scopes and choose 
the one that appears higher up in the hierarchy.

page, request, session,application
Mark
On 25 Sep 2004, at 18:20, Chris wrote:
If you're using JSTL in struts all the object will be available 
without
drilling through the scopes.
How JSTL and Struts communicate each other?
Could anybody please explain this *mysterious* thing detailly?
I really want to know the black box behind JSP using JSTL
and Struts taglibs , but the servlet code compiled from
JSP is too hard to explore.
Regards.
Chris
- Original Message -
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, September 25, 2004 11:29 PM
Subject: Re: JSTL problem

If you're using JSTL in struts all the object will be available 
without
drilling through the scopes.

In straight JSTL you'd use sessionScope. But as you're using struts 
you
dont need to and you can decide what you want to scope to in you java
or configuration of the ActionServlet..

HTH Mark
On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:

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


[OT] JDBCRealm + SecurityFilter

2004-09-25 Thread draegoon Z
Can anyone point me to an example of code to tie
a SecurityFilter into a JDBCRealm?
When I get this all working, I'm going to post it
with a detailed descrition and source!
_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/

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


Action Form variable null in Action Class

2004-09-25 Thread Priya Jotwani
Hi,

 

I have a dropdown in my JSP page along with a hidden variable . I select
something from the dropdown and Submit the form. In my Action Class,
when I try to access the hidden variable value as below :

 

ClientReportingForm myForm = (ClientReportingForm) form;

strSubAction = myForm.getSubAction();

 

But this strSubAction is always null. Why is my ActioForm not getting
populated when I submit the page.

Please HELP !!

 

TIA,

Priya



RE: Action Form variable null in Action Class

2004-09-25 Thread Gandle, Panchasheel
does the name of your hidden var is subAction.
and are you initializing it when you submit the page on selection of dropdown.

Or else you should have the dropdown named subAction.
Then only it would initialize the property.


-Original Message-
From: Priya Jotwani [mailto:[EMAIL PROTECTED]
Sent: Sat 9/25/2004 2:23 PM
To: Struts Users Mailing List
Subject: Action Form variable null in Action Class
 
Hi,

 

I have a dropdown in my JSP page along with a hidden variable . I select
something from the dropdown and Submit the form. In my Action Class,
when I try to access the hidden variable value as below :

 

ClientReportingForm myForm = (ClientReportingForm) form;

strSubAction = myForm.getSubAction();

 

But this strSubAction is always null. Why is my ActioForm not getting
populated when I submit the page.

Please HELP !!

 

TIA,

Priya



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

Re: ActionMessage and ActionMessages Problem

2004-09-25 Thread Michael McGrady
Mark Lowe wrote:
Satish
ActionErrors isn't deprecated, ActionError is...
http://struts.apache.org/api/org/apache/struts/action/ActionErrors.html
ActionErrors errors = new ActionErrors();
errors.add("myproperty" , new ActionMessage(...));
return errors;
And then personally i prefer

But there are good reasons for preferring html:messages as you can 
hide whole sections of unwanted html using them..

Mark 

There is a good presentation at page 421 /et seq. /in Ted Husted's 
_Struts in Action_.  Unfortunately, despite the excellent quality of 
Manning books, the index in this one is not top notch.  Ted has a huge 
amount of goodly things you find only by reading the whole book rather 
than using it as a resource through the index.

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


RE: Action Form variable null in Action Class

2004-09-25 Thread Priya Jotwani
The hidden variable name is subAction and I'm assigning it a value
'next' when I submit the page i.e on submit, I call a javascript method
which assigns the hidden variable value as 'next'. But in my Action
Class, 
form.getSubAction() fetches null :(

-Original Message-
From: Gandle, Panchasheel [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 26, 2004 12:56 AM
To: Struts Users Mailing List
Subject: RE: Action Form variable null in Action Class

does the name of your hidden var is subAction.
and are you initializing it when you submit the page on selection of
dropdown.

Or else you should have the dropdown named subAction.
Then only it would initialize the property.


-Original Message-
From: Priya Jotwani [mailto:[EMAIL PROTECTED]
Sent: Sat 9/25/2004 2:23 PM
To: Struts Users Mailing List
Subject: Action Form variable null in Action Class
 
Hi,

 

I have a dropdown in my JSP page along with a hidden variable . I select
something from the dropdown and Submit the form. In my Action Class,
when I try to access the hidden variable value as below :

 

ClientReportingForm myForm = (ClientReportingForm) form;

strSubAction = myForm.getSubAction();

 

But this strSubAction is always null. Why is my ActioForm not getting
populated when I submit the page.

Please HELP !!

 

TIA,

Priya




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



RE: [OT] JDBCRealm + SecurityFilter

2004-09-25 Thread David G. Friedman
You should check out the SecurityFilter forums at:
http://sourceforge.net/mailarchive/forum.php?forum_id=11303

OR Google to find pages like this:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20740042.html

This thread contains signicant bits of information:
http://sourceforge.net/mailarchive/message.php?msg_id=2145822

Keep in mind SecurityFilter includes Tomcat catalina wrapper
examples so if you're using Tomcat, it should either work
instantly or be relatively easy for your to customize.

Regards,
David, politely remding you to Google and RTFM before posting

-Original Message-
From: draegoon Z [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 2:04 PM
To: [EMAIL PROTECTED]
Subject: [OT] JDBCRealm + SecurityFilter


Can anyone point me to an example of code to tie
a SecurityFilter into a JDBCRealm?

When I get this all working, I'm going to post it
with a detailed descrition and source!

_
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


-
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] JDBCRealm + SecurityFilter

2004-09-25 Thread draegoon Z
My appologies. I did check all the archives and the forum with no luck,
but failed to google.
Thanks for the links.
PS: I was RTFS (source) because there isn't a good M.

From: "David G. Friedman" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: [OT] JDBCRealm + SecurityFilter
Date: Sat, 25 Sep 2004 15:36:44 -0400
You should check out the SecurityFilter forums at:
http://sourceforge.net/mailarchive/forum.php?forum_id=11303
OR Google to find pages like this:
http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20740042.html
This thread contains signicant bits of information:
http://sourceforge.net/mailarchive/message.php?msg_id=2145822
Keep in mind SecurityFilter includes Tomcat catalina wrapper
examples so if you're using Tomcat, it should either work
instantly or be relatively easy for your to customize.
Regards,
David, politely remding you to Google and RTFM before posting
-Original Message-
From: draegoon Z [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 2:04 PM
To: [EMAIL PROTECTED]
Subject: [OT] JDBCRealm + SecurityFilter
Can anyone point me to an example of code to tie
a SecurityFilter into a JDBCRealm?
When I get this all working, I'm going to post it
with a detailed descrition and source!
_
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
-
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]
_
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


Re: JSTL problem

2004-09-25 Thread Jason Lea
Chris wrote:
If you're using JSTL in struts all the object will be available without 
drilling through the scopes.
   

How JSTL and Struts communicate each other?
Could anybody please explain this *mysterious* thing detailly?
I really want to know the black box behind JSP using JSTL 

and Struts taglibs , but the servlet code compiled from 
JSP is too hard to explore.
 

The main points are that Struts puts form beans into either the session 
or request scope depending on what you configure struts to do.
The JSTL looks through the different scopes in order for the bean name.  
So the way to tie JSTL and Struts together is to know what the name of 
the bean that Struts has put into the scope.

From struts-config.xml you might have:

When this is used with an action it is put into the session/request 
scope under the name 'myFormBean'
So to use it in JSTL you can just use ${myFormBean.abc} to access the 
myFormBean.getAbc() property.

Regards.
Chris
- Original Message - 
From: "Mark Lowe" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, September 25, 2004 11:29 PM
Subject: Re: JSTL problem

 

If you're using JSTL in struts all the object will be available without 
drilling through the scopes.

In straight JSTL you'd use sessionScope. But as you're using struts you 
dont need to and you can decide what you want to scope to in you java 
or configuration of the ActionServlet..

HTH Mark
On 25 Sep 2004, at 15:27, M. Onur Tokan wrote:
   


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


--
Jason Lea



Spring security vs container-managed

2004-09-25 Thread Adam Hardy
I haven't been contributing here for at least six months, but I hope 
nobody minds if I jump right back in with a couple of questions. So 
hello everybody and here goes:

I'm looking at an architecture in my latest project which incorporates 
struts, EJBs, Spring and Hibernate.

Amongst other issues with this approach, I am struggling trying to work 
out what the best implementation should be in the JSPs for role-based 
authorisation, amongst other things. I can see only one solution which 
looks really ugly.

I have got pages that are very complicated, 100% specified and not 
usability-tested at all. Each page will have a crowd of controls whose 
presence depends on the user's role.

What I was planning was to seperate the role-specific form controls into 
another tile and use the tiles role-authorisation. However Spring 
security is now the order of the day, and I can't do that anymore. (Can I?)

The suggested solution is to wrap all form controls in a Spring-based 
role-manager taglib. The JSPs are ugly enough as it is so I find that 
idea bad.

What would be the best approach technically? Redesigning the screens? 
Insisting on CMS and not Spring? Just going along with it?

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


RE: [OT] JDBCRealm + SecurityFilter

2004-09-25 Thread David G. Friedman
If it still doesn't work, let me know and maybe I'll play with it.  I've
done that alot lately: play with items mentioned in requests to see how they
work. I use the thought: I'll probably need that eventually.  And with
SecurityFilter (and soon SSLext), I know I will eventually need it for my
current project. :)

Regards,
David

-Original Message-
From: draegoon Z [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 4:14 PM
To: [EMAIL PROTECTED]
Subject: RE: [OT] JDBCRealm + SecurityFilter


My appologies. I did check all the archives and the forum with no luck,
but failed to google.

Thanks for the links.

PS: I was RTFS (source) because there isn't a good M.


>From: "David G. Friedman" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: [OT] JDBCRealm + SecurityFilter
>Date: Sat, 25 Sep 2004 15:36:44 -0400
>
>You should check out the SecurityFilter forums at:
>http://sourceforge.net/mailarchive/forum.php?forum_id=11303
>
>OR Google to find pages like this:
>http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20740042.html
>
>This thread contains signicant bits of information:
>http://sourceforge.net/mailarchive/message.php?msg_id=2145822
>
>Keep in mind SecurityFilter includes Tomcat catalina wrapper
>examples so if you're using Tomcat, it should either work
>instantly or be relatively easy for your to customize.
>
>Regards,
>David, politely remding you to Google and RTFM before posting
>
>-Original Message-
>From: draegoon Z [mailto:[EMAIL PROTECTED]
>Sent: Saturday, September 25, 2004 2:04 PM
>To: [EMAIL PROTECTED]
>Subject: [OT] JDBCRealm + SecurityFilter
>
>
>Can anyone point me to an example of code to tie
>a SecurityFilter into a JDBCRealm?
>
>When I get this all working, I'm going to post it
>with a detailed descrition and source!
>
>_
>Don’t just search. Find. Check out the new MSN Search!
>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
>
>-
>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]
>

_
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Struts and EL/JSTL

2004-09-25 Thread Satish Talim
Hello,

I am using JBoss 4.0 and Struts 1.2.4. I am interested in using EL/JSTL along with 
Struts. However, I came across this comments by Karr, David (the person who wrote the 
Struts-EL library) "Struts-el is intended to be used in a JSP 1.2 container.  It is 
not used in a JSP 2.0 container. I feel that Struts-EL will certainly NOT become part 
of the core Struts tag library, as there's no point to it."
Therefore, a simple question is do we use the tag libraries as declared in 
struts-html-el.tld or c.tld etc? If not, how do we use something like 
It's very confusing.

Regards,

Satish Talim



RE: Struts and EL/JSTL

2004-09-25 Thread David G. Friedman
Satish,

JBoss v4.0 says it (like Tomcat 5.X.X) supports JSP 2.0.  So you can use the
standard Struts release and simply type in the ${expression} syntax from JSP
v2.0 directly into a struts tag or anywhere in the JSP page itself.  Do
${abc.xyz} to call the getXyz method of object abc.  Scopes should be
searched automatically in order as mentioned in previous posts today (or
yesterday) on JSP 2.0.  For IF statements, you can do ${ true ? "right" :
"wrong" } where this prints out the word "right" while it could be a method
call to retrieve data to display instead of the string "right" or the string
"wrong".  That makes  a Standard struts tag like:



work the same as:



One trick: In Tomcat 5.X.X, (I don't know about JBoss 4.0) if you don't
configure a line in your WEB-INF/web.xml, JSP 2.0 syntax won't work unless
you add this to the top of your JSP (Note: this trick was posted to the list
within the last 24 hours):

<%@ page isELIgnored="false" %>

That trick was posted today. I just tried it with "true" and "false" and was
amazed.  I suppose you'd use it with "true" if you had globally set JSP 2.0
on for your webapp but choose to selectively turn it off in particular JSPs
for some security reason.  I just tried it and it's freaky/cool. :)

For an interesting JSP 2.0 reference card, try Sun at:
http://java.sun.com/products/jsp/syntax/2.0/card20.pdf

I hope this information helps.

Regards,
David

-Original Message-
From: Satish Talim [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 10:09 PM
To: [EMAIL PROTECTED]
Subject: Struts and EL/JSTL


Hello,

I am using JBoss 4.0 and Struts 1.2.4. I am interested in using EL/JSTL
along with Struts. However, I came across this comments by Karr, David (the
person who wrote the Struts-EL library) "Struts-el is intended to be used in
a JSP 1.2 container.  It is not used in a JSP 2.0 container. I feel that
Struts-EL will certainly NOT become part of the core Struts tag library, as
there's no point to it."
Therefore, a simple question is do we use the tag libraries as declared in
struts-html-el.tld or c.tld etc? If not, how do we use something like 
It's very confusing.

Regards,

Satish Talim



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



Re: Struts and EL/JSTL

2004-09-25 Thread Satish Talim
David it works! Thanks.

Satish

- Original Message -
From: "David G. Friedman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Satish Talim"
<[EMAIL PROTECTED]>
Sent: Sunday, September 26, 2004 10:23 AM
Subject: RE: Struts and EL/JSTL


Satish,

JBoss v4.0 says it (like Tomcat 5.X.X) supports JSP 2.0.  So you can use the
standard Struts release and simply type in the ${expression} syntax from JSP
v2.0 directly into a struts tag or anywhere in the JSP page itself.  Do
${abc.xyz} to call the getXyz method of object abc.  Scopes should be
searched automatically in order as mentioned in previous posts today (or
yesterday) on JSP 2.0.  For IF statements, you can do ${ true ? "right" :
"wrong" } where this prints out the word "right" while it could be a method
call to retrieve data to display instead of the string "right" or the string
"wrong".  That makes  a Standard struts tag like:



work the same as:



One trick: In Tomcat 5.X.X, (I don't know about JBoss 4.0) if you don't
configure a line in your WEB-INF/web.xml, JSP 2.0 syntax won't work unless
you add this to the top of your JSP (Note: this trick was posted to the list
within the last 24 hours):

<%@ page isELIgnored="false" %>

That trick was posted today. I just tried it with "true" and "false" and was
amazed.  I suppose you'd use it with "true" if you had globally set JSP 2.0
on for your webapp but choose to selectively turn it off in particular JSPs
for some security reason.  I just tried it and it's freaky/cool. :)

For an interesting JSP 2.0 reference card, try Sun at:
http://java.sun.com/products/jsp/syntax/2.0/card20.pdf

I hope this information helps.

Regards,
David

-Original Message-
From: Satish Talim [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 25, 2004 10:09 PM
To: [EMAIL PROTECTED]
Subject: Struts and EL/JSTL


Hello,

I am using JBoss 4.0 and Struts 1.2.4. I am interested in using EL/JSTL
along with Struts. However, I came across this comments by Karr, David (the
person who wrote the Struts-EL library) "Struts-el is intended to be used in
a JSP 1.2 container.  It is not used in a JSP 2.0 container. I feel that
Struts-EL will certainly NOT become part of the core Struts tag library, as
there's no point to it."
Therefore, a simple question is do we use the tag libraries as declared in
struts-html-el.tld or c.tld etc? If not, how do we use something like 
It's very confusing.

Regards,

Satish Talim




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