[struts-faces] tag with module

2004-06-04 Thread Ng Chong Hin NCS
Hi!
 
  Currently, I am in the midst of converting a working Struts application
(JSP/Tiles/Modules) to one that uses JSF, using the struts-faces integration
library.
 
  Having problems retrieving the messages from the
"message-module1.properties" resource (defined in the
struts-config-module1.xml) ...
 
  When attempting to use the message key like , an
exception is reported:
 
- Root Cause -
java.lang.NullPointerException
at
org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:195)
at
javax.faces.webapp.UIComponentTag$1.write(UIComponentTag.java:946)
at
com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWrit
er.java:519)
at
org.apache.struts.faces.renderer.WriteRenderer.encodeEnd(Unknown Source)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:713)
at
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:606)
at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:529)
at
org.apache.jsp.Messages_jsp._jspx_meth_s_message_0(Messages_jsp.java:264)
at
org.apache.jsp.Messages_jsp._jspx_meth_c_if_0(Messages_jsp.java:230)
at org.apache.jsp.Messages_jsp._jspService(Messages_jsp.java:88)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
 
  Some notes:
(1) I am running using Tomcat 4.1.20, J2SE 1.4.2_04, Struts 1.1, JSF RI
1.1 and struts-faces 0.5
(2) Have already defined 
(3) It is working if I use the  tag instead
 
  Any help or pointers would be appreciated.
 
  Thanks!
 
CH


RE: Hidden Variables

2004-06-04 Thread Joshi, Naveen
Request Scope Form.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 2:48 AM
To: Struts Users Mailing List
Subject: RE: Hidden Variables


Is is a session or request scoped form?

-Original Message-
From: Joshi, Naveen [mailto:[EMAIL PROTECTED]
Sent: Thursday, 3 June 2004 21:48
To: Struts Users Mailing List
Subject: RE: Hidden Variables


It was based on log files that we found this error. This has happened for
couple of screens. It will work through out well, pass all the variables
properly and all of a sudden it will not pass one such varaible whereas all
other variables will be passed in the same screen. This is killing me. We
use Internet explorer(5.5 or above) and Netscape(4.7 or above). I have never
seen any user reporting the errors while using Netscape so I'am assuming
that it is a browser error. The difficult part is we are not able to
replicate the same scenario as this occurs once in a blue moon. Moreover
this has happened when there are few or more concurrent users. Wanted to
know if any of you have got the similar error. If there is a possible
solution please let me know.

Thanks


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 7:28 AM
To: Struts Users Mailing List
Subject: Re: Hidden Variables


How do you know it is 1 in 300?  Is that based on tests or on browsing log
files?



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx




- Original Message -
From: "Joshi, Naveen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 02, 2004 8:10 AM
Subject: RE: Hidden Variables


I use Post method.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Lionel
Sent: Wednesday, June 02, 2004 5:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Hidden Variables


Joshi, Naveen wrote:
> All,
>
> one out of 300 times my hidden variable would not set to form. Any
> ideas what could be the issue.

do you use get or post method to send your form ?




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



sitemesh include problem

2004-06-04 Thread Marco Rossi
Hi, 
I try to use sitemesh instead of tiles; in my “decorator” template page I need 
to include a struts action.
I try to do this:
, but I catch the following
java.lang.IllegalStateException: Response has already been committed

Any suggestion?


Cerchi un laboratorio fotografico aperto 24 ore su 24?
Stampa le tue foto digitali su Kataweb e le ricevi a domicilio in 48 ore.
http://www.kataweb.it/foto


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



RE: Deprecated Method

2004-06-04 Thread Joe Hertz
In your action, instead of:

servlet.getResources(); // Deprecated

Use

this.getResources(request); // Not Deprecated

> -Original Message-
> From: Jason L. West, Sr. [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 04, 2004 12:25 PM
> To: Struts Users Mailing List
> Subject: Deprecated Method
> 
> 
> I am finishing up a series of WROX books that are focused on 
> the JSP/J2EE development with the last book of the series 
> focusing on developing Struts Applications.  Unfortunately 
> the series was published in early 2002 with focus on the 
> Struts version 1.0.
> 
> One of the methods the book talks about has been deprecated 
> with the release of Struts version 1.1.  What I would like to 
> know is new or better method of doing the following:
> 
> public void reset(ActionMapping mapping, HttpServletRequest request) {
>  ActionServlet servlet =  this.getServlet();
>  MessageResources messageResources = 
> servlet.getResources(); // Deprecated
> 
>  storyTitle = 
> messageResources.getMessage("javaedge.poststory.title.instructions");
>  storyIntro = 
> messageResources.getMessage("javaedge.poststory.intro.instructions");
>  storyBody  = 
> messageResources.getMessage("javaedge.poststory.body.instructions");
> }
> 
> Any insight would be helpful.
> 
> Thanks
> Jason L. West, Sr.
> Internet Application Specialist, Sr.
> 
> 
> -
> 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: implementation of permission subsystem

2004-06-04 Thread Joe Hertz
You tried the Declarative Security model built into Tomcat? You can use
that to talk to the database by defining a "JDBCRealm".

Or even better (since that doesn't give you a login form you can use the
way you might expect to), take a look at SecurityFilter, which is what I
use. 

http://www.securityfilter.org

HTH

> -Original Message-
> From: Ding Lei [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 04, 2004 9:03 PM
> To: Struts Users Mailing List; Ding Lei
> Subject: Re: implementation of permission subsystem
> 
> 
> One more thing, the system stores all user & group 
> information in database So storing role information in a 
> tomcat/struts configuration isn't really possible.
> 
> On Sat, Jun 05, 2004 at 08:59:41AM +0800, Ding Lei wrote:
> > Hello folks,
> > I am working on a DVB(Digital video broadcasting) 
> content management
> > webapp, which is based on the struts framework. It 
> mainly includes application,
> > service,network, user,broadcasting management & etc. The system is 
> > originally designed almost without considering security issues, i.e 
> > almost all operations are done without permission check.
> >Later on, I spent quite a few days attempting to implement a 
> > General permission control arch. with Dynamic Proxy, which checks a 
> > method's permission at runtime by it's name. But soonly 
> found out that 
> > this sytem's methods' naming are really a mess. For ex, 
> some methods 
> > are called "del" which actually does the "remove" operation, & vice 
> > versa. Even worse, same type of methods takes very 
> different type of 
> > arguments  a DVBUserManager.removeUser takes a DVBUser 
> object as argument, and a DVBNetworkManager takes a 
> DVBNetwork object as argument.
> >   So .. I found then I was endlessly adding bunches of "if" 
> to handle 
> > different specific methods in the Dynamic Proxy class.
> >   My question is, is there any good permission control framework 
> > provided directly/indirectly for Struts/Tomcat based applications  ?
> >   If not, would you please suggest some others?
> > 
> >   Thank you.
> > 
> > 
> > --
> > Yours,
> > 
> ><<<:   D i n gL e i   ::>>
> >  ||  ||
> >  || Ext: 8106||
> >  || Email:||
> >  || Dept. Of Technology/Engineering  ||
> >  || Embedded Internet Solutions Inc. ||
> >  ||  ||
> > <((= )>>>
> > 
> > The economy depends about as much on economists as the 
> weather does on 
> > weather forecasters.
> > -- Jean-Paul Kauffmann
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> -- 
> Yours,
> 
><<<:   D i n gL e i   ::>>
>  ||  ||
>  || Ext: 8106||
>  || Email:||
>  || Dept. Of Technology/Engineering  ||
>  || Embedded Internet Solutions Inc. ||
>  ||  ||
> <((= )>>>
>   
> "What is the robbing of a bank compared to the FOUNDING of a bank?"
>   -- Bertold Brecht
> 
> -
> 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: implementation of permission subsystem

2004-06-04 Thread Ding Lei
One more thing, the system stores all user & group information in database
So storing role information in a tomcat/struts configuration isn't really
possible.

On Sat, Jun 05, 2004 at 08:59:41AM +0800, Ding Lei wrote:
> Hello folks,
>   I am working on a DVB(Digital video broadcasting) content management
> webapp, which is based on the struts framework.   It mainly includes application,
> service,network, user,broadcasting management & etc. The system is originally
> designed almost without considering security issues, i.e almost all operations
> are done without permission check.
>Later on, I spent quite a few days attempting to implement a General permission
> control arch. with Dynamic Proxy, which checks a method's permission at runtime by 
> it's name.
> But soonly found out that this sytem's methods' naming are really a mess. For ex,
> some methods are called "del" which actually does the "remove" operation, & vice 
> versa.
> Even worse, same type of methods takes very different type of arguments  
> a DVBUserManager.removeUser takes a DVBUser object as argument, and a 
> DVBNetworkManager takes
> a DVBNetwork object as argument. 
>   So .. I found then I was endlessly adding bunches of "if" to handle different 
> specific
> methods in the Dynamic Proxy class.
>   My question is, is there any good permission control framework provided 
> directly/indirectly
> for Struts/Tomcat based applications  ? 
>   If not, would you please suggest some others?
> 
>   Thank you.
> 
> 
> -- 
> Yours,
> 
><<<:   D i n gL e i   ::>>
>  ||  ||
>  || Ext: 8106||
>  || Email:||
>  || Dept. Of Technology/Engineering  ||
>  || Embedded Internet Solutions Inc. ||
>  ||  ||
> <((= )>>>
>   
> The economy depends about as much on economists as the weather does on
> weather forecasters.
>   -- Jean-Paul Kauffmann
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Yours,

   <<<:   D i n gL e i   ::>>
 ||  ||
 || Ext: 8106||
 || Email:||
 || Dept. Of Technology/Engineering  ||
 || Embedded Internet Solutions Inc. ||
 ||  ||
<((= )>>>

"What is the robbing of a bank compared to the FOUNDING of a bank?"
-- Bertold Brecht

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



implementation of permission subsystem

2004-06-04 Thread Ding Lei
Hello folks,
I am working on a DVB(Digital video broadcasting) content management
webapp, which is based on the struts framework. It mainly includes application,
service,network, user,broadcasting management & etc. The system is originally
designed almost without considering security issues, i.e almost all operations
are done without permission check.
   Later on, I spent quite a few days attempting to implement a General permission
control arch. with Dynamic Proxy, which checks a method's permission at runtime by 
it's name.
But soonly found out that this sytem's methods' naming are really a mess. For ex,
some methods are called "del" which actually does the "remove" operation, & vice versa.
Even worse, same type of methods takes very different type of arguments  
a DVBUserManager.removeUser takes a DVBUser object as argument, and a 
DVBNetworkManager takes
a DVBNetwork object as argument. 
  So .. I found then I was endlessly adding bunches of "if" to handle different 
specific
methods in the Dynamic Proxy class.
  My question is, is there any good permission control framework provided 
directly/indirectly
for Struts/Tomcat based applications  ? 
  If not, would you please suggest some others?

  Thank you.


-- 
Yours,

   <<<:   D i n gL e i   ::>>
 ||  ||
 || Ext: 8106||
 || Email:||
 || Dept. Of Technology/Engineering  ||
 || Embedded Internet Solutions Inc. ||
 ||  ||
<((= )>>>

The economy depends about as much on economists as the weather does on
weather forecasters.
-- Jean-Paul Kauffmann

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



Re: Controller for web services

2004-06-04 Thread Frank Zammetti
I probably wouldn't bother replying to this, since a lot of it is supplanted 
by what I did for the later public WS project.  I would just ignore what I 
posted here, it's kind of old news at tis point :)

Have you looked through the documentation on my quick project site?  The 
Technical Details there is probably what your most interested in.

Frank
From: Pedro Salgado <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Controller for web services
Date: Fri, 04 Jun 2004 22:31:08 +0100
  (to frank) I really have to read more carefully this answer and post a
reply (I already answered some things on the web services enablement thread
:D).
My web services background has improved (thanks to more than 30
articles+books) but I need more time to analyze the solution you are
proposing and check your framework more carefully.
  I found some answers in the Java development with ant sample chapter and
on the Axis documentation.
  I will gather all together and then make a reply.
  (to all) Thank you for your help.
Pedro Salgado
On 04/05/21 15:21, "None None" <[EMAIL PROTECTED]> wrote:
> Another option is what I've implemented in a project recently...
>
> First, every single Web Service request is directed to a single Action
> mapping, quit originally called /WebServices.app :)
>
> Then, in the action I first check for the SOAPAction header, making the
> assumption that only a valid Web Service request will contain it (that's 
not
> a requirement of the SOAP spec as far as I know, but generally people 
and
> products to adhere to that rule, and certainly you can tell your clients
> they must to use your services).  If it's not found I forward to an 
error
> page, presumably someone would see it, if not, too bad :)
>
>> From then on, it's really just a question of parsing the SOAP 
envelope...
> all my services at this point I've dictated must be "flat", i.e., no 
nested
> XML nodes, in other words, all elements are a child of the root node 
(that
> to me is relatively flat, at least relative to the root node).  This is
> actually sufficient for the vast majority of our services.  The only 
reason
> I did it this way was that it made dealing with the SOAP message very 
easy:
> just read the body of the request, which is the SOAP message, and parse 
it
> with normal XML parsing classes.  I didn't need to get any special SOAP
> parsing classes for this.  Obviously a more robust solution would, but 
this
> was done with simplicity in mind.
>
> Part of the WSDL spec for all my services is a RequestedService element.
> This, unbeknownst to the caller, is actually a class name (for instance,
> ChangePassword is one, FindAccount is another).  I have a package
> com.company.app.webservices where all these classes live.  So, I 
instantiate
> the class, which extends from a custom abstract class I wrote called
> WSHandler, and passed control to it to do whatever it is that it does 
(which
> in all cases here is a call to the business logic classes of the larger
> app).
>
> Before I forget, there is also a UserID and Password element requried 
for
> all requests, and I do the same validation on the WS requests as I would 
any
> other non-service request through this system.
>
> The WSHandler class basically contains three methods: startResponse,
> endResponse and process.  The first two, as the name implies, writes out 
the
> common portions of the SOAP envelope.  For example,. here's the actual
> startResponse method:
>
> // Must be called first in the process method.
> void startResponse(HttpServletResponse wsResponse) throws Exception {
>
>   wsOutBuffer = new StringBuffer();
>   wsOutBuffer.append("\n");
>   wsOutBuffer.append("
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\";
> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";>\n");
>   wsOutBuffer.append("  \n");
>
> } // End startResponse()
>
> Very straight-forward.  The process() method is what the Action calls, 
and
> as the comment above says, it must start by calling startResponse(). 
Then,
> it does it's work and constructs the payload of the SOAP message.  
Here's an
> example from the ChangePassword service:
>
> public void process(HashMap wsParameters, String logonMessage) throws
> Exception{
> // Get the parameters we need for the call
> String userID  = (String)wsParameters.get("userID");
> String currentPassword = 
(String)wsParameters.get("currentPassword");
> String newPassword = (String)wsParameters.get("newPassword");
> if (userID  == null) { userID  = ""; }
> if (currentPassword == null) { currentPassword = ""; }
> if (newPassword == null) { newPassword = ""; }
> // Instantiate needed function beans
> Connection conn = DBConnectionManager.createConnection();
> UsersFBusFB = new UsersFB(conn);
> // Call the function bean

Re: Controller for web services

2004-06-04 Thread Pedro Salgado

  (to frank) I really have to read more carefully this answer and post a
reply (I already answered some things on the web services enablement thread
:D).
My web services background has improved (thanks to more than 30
articles+books) but I need more time to analyze the solution you are
proposing and check your framework more carefully.

  I found some answers in the Java development with ant sample chapter and
on the Axis documentation.

  I will gather all together and then make a reply.

  (to all) Thank you for your help.

Pedro Salgado

On 04/05/21 15:21, "None None" <[EMAIL PROTECTED]> wrote:

> Another option is what I've implemented in a project recently...
> 
> First, every single Web Service request is directed to a single Action
> mapping, quit originally called /WebServices.app :)
> 
> Then, in the action I first check for the SOAPAction header, making the
> assumption that only a valid Web Service request will contain it (that's not
> a requirement of the SOAP spec as far as I know, but generally people and
> products to adhere to that rule, and certainly you can tell your clients
> they must to use your services).  If it's not found I forward to an error
> page, presumably someone would see it, if not, too bad :)
> 
>> From then on, it's really just a question of parsing the SOAP envelope...
> all my services at this point I've dictated must be "flat", i.e., no nested
> XML nodes, in other words, all elements are a child of the root node (that
> to me is relatively flat, at least relative to the root node).  This is
> actually sufficient for the vast majority of our services.  The only reason
> I did it this way was that it made dealing with the SOAP message very easy:
> just read the body of the request, which is the SOAP message, and parse it
> with normal XML parsing classes.  I didn't need to get any special SOAP
> parsing classes for this.  Obviously a more robust solution would, but this
> was done with simplicity in mind.
> 
> Part of the WSDL spec for all my services is a RequestedService element.
> This, unbeknownst to the caller, is actually a class name (for instance,
> ChangePassword is one, FindAccount is another).  I have a package
> com.company.app.webservices where all these classes live.  So, I instantiate
> the class, which extends from a custom abstract class I wrote called
> WSHandler, and passed control to it to do whatever it is that it does (which
> in all cases here is a call to the business logic classes of the larger
> app).
> 
> Before I forget, there is also a UserID and Password element requried for
> all requests, and I do the same validation on the WS requests as I would any
> other non-service request through this system.
> 
> The WSHandler class basically contains three methods: startResponse,
> endResponse and process.  The first two, as the name implies, writes out the
> common portions of the SOAP envelope.  For example,. here's the actual
> startResponse method:
> 
> // Must be called first in the process method.
> void startResponse(HttpServletResponse wsResponse) throws Exception {
> 
>   wsOutBuffer = new StringBuffer();
>   wsOutBuffer.append("\n");
>   wsOutBuffer.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\";
> xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\";
> xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";>\n");
>   wsOutBuffer.append("  \n");
> 
> } // End startResponse()
> 
> Very straight-forward.  The process() method is what the Action calls, and
> as the comment above says, it must start by calling startResponse(). Then,
> it does it's work and constructs the payload of the SOAP message.  Here's an
> example from the ChangePassword service:
> 
> public void process(HashMap wsParameters, String logonMessage) throws
> Exception{
> // Get the parameters we need for the call
> String userID  = (String)wsParameters.get("userID");
> String currentPassword = (String)wsParameters.get("currentPassword");
> String newPassword = (String)wsParameters.get("newPassword");
> if (userID  == null) { userID  = ""; }
> if (currentPassword == null) { currentPassword = ""; }
> if (newPassword == null) { newPassword = ""; }
> // Instantiate needed function beans
> Connection conn = DBConnectionManager.createConnection();
> UsersFBusFB = new UsersFB(conn);
> // Call the function bean to do our work
> boolean cpResult = usFB.changePassword(userID, currentPassword,
> newPassword);
> // Finalize the function bean
> usFB.cleanup();
> // Generate our output and return it
> startResponse(workContext);
>   writeResponse(" xmlns=\"TOAWebServices\">");
>   writeResponse("  ");
>   if (cpResult) {
> writeResponse("  Password Changed");
>   } else {
> writeResponse("  Password NOT Changed");
>   }
>   writeResponse("  ");
>   writeResponse("");
> finishResponse();
> } // End 

Re: Strus Web Service Enablement

2004-06-04 Thread Pedro Salgado
On 04/06/04 16:10, "Marco Mistroni" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
>>   How could one use your RequestProcessor if I am using Axis and
>> publishing web services through WSDD or JWS files?
> 
> Point here, if I understood correctly, is that frank is implementing
> The serverside part. So if you or I or anyone else would use his
> package,
> It will be for enabling an existing struts application to be called
> As webservice.

  Written this way it seems more interesting: one could use the same struts
actions to implement a web-based interface or to transfer data between
systems.

> 
> I have used axis long time ago (and not for an advanced example
> either..), but  wouldn't it be enough if you construct a SOAP  message
> and send it
> To the struts app URL?
> Will u have any drawback in doing that, if you abstract the way you call
> The webservice?
> 
> 
> Again, I m no expert with axis, but I thought there was an API that you
> Can simply construct an XML message and post it to the webservice URL
> (JAXM?)
> 
> 
>> imitations of my code is that only Strings can currently be passed as
>> parameters to a service, and only Strings can be returned, so certainly
>> much 
>> of the full power of Web Services cannot be utilizied (and I'm not sure
> I 
>> see any way to change that based on what I've done), so it's possibly
>> always 
>> going to be of limited utility.  I don't expect that this is going to
> be 
>> useful for every Web Service situation, indeed it may only be useful in
>> some 
>> limited subset.
> 
> AFAIK, ultimately in an XML message everything will be reduced to a
> String.
> If u need for some reason to map it to a specific type, have a look at
> The org.commons.beanutils.ConvertingWrapDynaBean class and see if it can
> help
> 
> 
> Dunno what the client would to though..
> 
> Regars
> marco
> 
> 
> 
> 
> 
> In any case, you've given me some things to go Google now :)
> 
> Frank
> 
>> Pedro Salgado
>> 
>> 
>>> Ah, I see.  I'm not familiar enough with filters, but I had always
>>> thought  they were on the input side only.  If that belief is wrong,
>>> then it  certainly becomes an option.
>>> 
>>> I think at some point to make this really worth anything I'll have
> to
>>> break  my "transparency rule" to some extent.  I do like the idea of
>>> generating the  output with a JSP because it's just so easy!  A
> little
>>> bit of background...  I actually implemented this same thing in a
> custom
>>> framework we were  previously using in-house.  In that application I
>>> actually do write out the  output in servlets, there is never a
> forward
>>> to a JSP or anything else  typically in the "view" layer.
>>>  This works
>>> just fine, but when I started  doing it in Struts it ocurred to me
> that
>>> I could really simplify things by  not taking that approach and
> instead
>>> let the actual XML generation be done  in a JSP.  That also removed
> the
>>> one change that was required under the old  framework: you did have
> to
>>> add two function calls to the controller servlets  that were exposed
> as
>>> services.  Not a big change, but I wanted to avoid code  changes
>>> entirely here.
>>> 
>>> At this point my belief is that probably the best way to handle this
> is
>>> to  have an element added to the Action mappings in
> Struts-Config.xml
>>> that  specifies the target JSP for a Web Service request.  The
> default
>>> woudl be  the "generic" template I put together, although a bit more
>>> flexible as time  goes on.  But, the point is that you could then
> define
>>> an XML template in  essence for every Action you wanted to expose as
> a
>>> service.  That would  allow for things I probably can't do
>>> automatically.  I'd also write a taglib  to make life easier
> (although I
>>> might not have to... the current Struts  taglibs might be more than
>>> sufficient on their own).
>>> 
>>> That would of course require a change to the DTD for
> Struts-Config.xml,
>>> so  in the mean time what I think I'm going to do is add an optional
>>> config file  thatwould be parsed via a plug-in at app startup that
> would
>>> contain these  extra mappings.  Fairly trivial exercise, and it
> leaves
>>> it completely  optional, no changes to Struts required.
>>> 
>>> Also, I realized on the drive in that there's no need to put the
>>> parameters  as a query string as I'm doing... I can just put the
> parsed
>>> parameters  directly into the request object as an attribute.  Since
>>> only the second  pass of a Web Service request would know or care
> about
>>> that object, it will  basically just remove some code and simplify
>>> things a bit.
>>> 
>>> I'm hoping to get these thnigs done today and release a .02 package
>>> before I  leave work today (it's nice when your development server
> is
>>> down and you  can't do any real work until the techs rebuild it!)...
> I
>>> also hope to remove  the required actionMappingPath element in the
> XML
>>> request... I haven't found  a way to get at the r

Re: Strus Web Service Enablement

2004-06-04 Thread Pedro Salgado
On 04/06/04 15:51, "Frank Zammetti" <[EMAIL PROTECTED]> wrote:
> Hmm... If I understand your suggestion correctly, that would require a new
> class for any Action you want to expose, correct?  That's something I wanted
> to avoid.  It's good in the sense that no code has to change (config files
> don't count in my mind, so that's OK to do), and while adding a whole new
> class isn't as bad in my mind, it's still something I'd prefer to avoid if
> possible.

  You're right. One still needs to make a custom processForm on
RequestProcessor to handle the "SOAPForm" correctly.

> I haven't looked a Tiles at all yet (I'm actually fairly new to Struts
> still), so I can't really make any intelligent comment on this (except, I
> hope, for the comment that I can't make an intelligent comment on it! :) )
> 
>>   How could one use your RequestProcessor if I am using Axis and
>> publishing web services through WSDD or JWS files?
> 
> I can't answer that either because while I know a little about Axis (a very
> little), I don't know anything about WSDD or JWS.
> 

  Check the chapter 15 sample from the book Java Development with Ant. In a
day or two you get the main picture (it covers web services development with
ant and .net integration).

  Just handling strings is a little limited but what if... Instead of having
the form defined and populated as a regular bean, why not make the
marshaling of the xml document inside of the soap envelope?
  You do have the syntax that should be sent on the envelope. You just need
the right bean to marshall to. (It may not be marshal but unmarshal... I get
them both confused, all the time).

Pedro Salgado


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



Struts and OLAP

2004-06-04 Thread Julio Cesar De Salvo
Have you worked in this environment??
Do you have any ideas,
thanks
 
Julio Cesar De Salvo - Project Leader 
iTechnology S.R.L. - Ciudad de la Paz 2846 - piso 1
Tel 54 11 4782.6901 / Fax 54 11 4782.6901
 [EMAIL PROTECTED]
AVISO DE CONFIDENCIALIDAD. La información incluida en este e-mail está
dirigida únicamente al destinatario. Puede contener información
privilegiada, confidencial y que no debe ser revelada. Si ha recibido
este e-mail por error, por favor no disemine, utilice, publique,
distribuya, revele o copie esta comunicación de ningún modo. En cambio,
por favor notifíquenos inmediatamente remitiéndonos este e-mail (incluso
el mensaje original en su contestación), por fax (54-11-4782-6901) o
teléfono (54-11-4782-6901) y entonces elimine y deseche todas las copias
de este e-mail. Gracias.
CONFIDENTIALITY NOTICE. The information in this e-mail is intended for
the designated recipient only. It may contain information that is
privileged, confidential and exempt from disclosure. If you have
received this e-mail in error, please do not disseminate, use, publish,
distribute, disclose or copy this communication in any way. Instead,
please notify us immediately by return e-mail (including the original
message in your reply), by fax (54-11-4782-6901) or by telephone
(54-11-4782-6901) and then delete and discard all copies of this e-mail.
Thank you.
 


Re: Error

2004-06-04 Thread James Mitchell
I hit this recently.  Remove your html comments (  ) from the
offending jsp and try again.



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

- Original Message -
From: "Smith, Johnathan M." <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, June 04, 2004 3:18 PM
Subject: Error


> I have a system in Strut running on WAS4 and its ok but if I try to run
the
> same code on WAS5 I get the following error
>
> [End of content reached while more parsing required: tag nesting error?]:
> org.apache.jasper.compiler.ParseException: End of content reached while
more
> parsing required: tag nesting error?
>
>
>
> Please do not transmit orders or instructions regarding a UBS account by
> email. The information provided in this email or any attachments is not an
> official transaction confirmation or account statement. For your
protection,
> do not include account numbers, Social Security numbers, credit card
> numbers, passwords or other non-public information in your email. Because
> the information contained in this message may be privileged, confidential,
> proprietary or otherwise protected from disclosure, please notify us
> immediately by replying to this message and deleting it from your computer
> if you have received this communication in error.  Thank you.
>
> UBS Financial Services Inc.
> UBS International Inc.
>
>
> -
> 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]



Error

2004-06-04 Thread Smith, Johnathan M.
I have a system in Strut running on WAS4 and its ok but if I try to run the
same code on WAS5 I get the following error

[End of content reached while more parsing required: tag nesting error?]:
org.apache.jasper.compiler.ParseException: End of content reached while more
parsing required: tag nesting error?



Please do not transmit orders or instructions regarding a UBS account by
email. The information provided in this email or any attachments is not an
official transaction confirmation or account statement. For your protection,
do not include account numbers, Social Security numbers, credit card
numbers, passwords or other non-public information in your email. Because
the information contained in this message may be privileged, confidential,
proprietary or otherwise protected from disclosure, please notify us
immediately by replying to this message and deleting it from your computer
if you have received this communication in error.  Thank you.

UBS Financial Services Inc.
UBS International Inc.


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



Re: People Soft Component Interface

2004-06-04 Thread Bill Siggelkow
Off the top of my head I would look into whether or not PeopleSoft 
supports the JCA (Java Connector Architecture) -- it was designed for 
just this sort of thing.

Zhang, Larry (L.) wrote:
Sorry for this off topic question, but I don't know which group I should post this 
question. I posted this on People Soft company discussion group, but no one answered 
my question.
EJB in Java as a technology has become more and more widely used to perform 
transaction (update, delete, insert) against database. When using Java to perform a 
People Soft 8 transaction, we need to communicate to People Soft 8 tables via 
Component Interface(a People Soft 8 Java term). My question is that does using 
Component Interface prevent we employee EJB? Do you or you know of some one using EJB 
to perform People Soft 8 transaction via Component Interface?
Thanks folks.
Larry Zhang 

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


Re: HTTP header for dynamic pdf and IE6

2004-06-04 Thread Dean A. Hoover
Frank Zammetti wrote:
I'm doing this as well, and three things come to mind...
(1) For IE, you must set the response size or it'll choke.  Looks like 
your doing that already.
(2) Try adding response.setContentType("application/pdf"); to your 
code.  That's the only extra thing I'm doing in my code. 
I am setting the content type as stated above. The best way to see that 
is to check my header that I included
in the email message. As a side note, I am not setting the charset, it 
seems that gets set automagically when I
call response.setContentType("application/pdf");

(3) Acrobat integration with IE is known to be buggy, and that's being 
polite!  In Acrobat itself, there is an option to specify whether the 
PDF is opened integrated in the browser or in a separate window.  The 
former is many times problematic.  Try changing that option and see if 
your problem goes away.  In Acorbat 6.0, it's under the Edit menu, 
Preferences, the Internet "tab", and it's the Display PDF In Browser 
option.  Uncheck it, close Acrobat (make sure it's really closed, I 
find the Acrobat process keeps running most of the time, very 
annoying) and give it a try. 
Since I am creating a public website, I really don't want to force the 
user to reconfigure their machine. As I stated in my original
message, Yahoo mail seems to handle this OK. They are doing some bizarre 
things though. Most interesting is adding filename="foo.bar"
to the content type. I tried playing with that stuff, but as I noted 
earlier, I am missing something.


Hope that helps!
Frank

From: "Dean A. Hoover" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: HTTP header for dynamic pdf and IE6
Date: Fri, 04 Jun 2004 08:37:45 -0400
Sorry if this is inappropriate for this list,
but I really don't know where else to turn. I
figured someone on this list may have solved it.
I have a java web application that allows
an end-user in their browser to download
a "file", which happens to be bytes stored
in a database.
In experimenting with how to do this, I have
this snippet of code in my Action:
   AttachmentListItem attachment =
EmailSQL.getAttachmentListItem(connection, 3, 1);
   response.setContentType(attachment.getContentType());
   byte[] data =
EmailSQL.getAttachmentBytes(connection, 3, 1);
   response.setContentLength(data.length);
   response.setHeader("Content-Disposition",
"attachment; filename=\"" + attachment.getFileName() + 
"\"");
   ServletOutputStream out = response.getOutputStream();
   out.write(data);
   out.flush();
   out.close();

To test this out, I hit the link in my IE browser which brings up
a dialog box allowing me to "Open" or "Save" the file. If I save
the file, it does the right thing. If I press the open button, Acrobat
Reader opens up and then errors out with an alert box:
"There was an error opening the document. The file does not exist."
I have a yahoo email account that I tried a test on. I sent an email
message with the same pdf file attached to that account. I wanted to
see if yahoo figured out how to make this work. They did! (but I can't
figure out how to replicate)
Their header looks like this:
Date: Thu, 03 Jun 2004 15:37:58 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Content-Disposition: attachment; filename=reference.pdf
Connection: close
Transfer-Encoding: chunked
Content-Type: application/pdf; filename="foo.bar"
.s4g--&v=1
There is also some other stuff I am seeing just after the header: 
.s4g-&v=1
which looks something like a query string, but I'm not sure.

My header looks like this:
HTTP/1.1 200 OK
Date: Thu, 03 Jun 2004 15:35:15 GMT
Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a
Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Disposition: attachment; filename="reference.pdf"
Content-Length: 214982
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf;charset=UTF-8
Does anyone know how to work around this problem? I suppose
there are actually 2 parts to this:
1) What is the magic in the HTTP header that allows this to work?
2) How can one create such a header in java?
Thanks.
Dean Hoover


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Check out the coupons and bargains on MSN Offers! 
http://youroffers.msn.com

--

sitemesh include problem

2004-06-04 Thread [EMAIL PROTECTED]
Hi, 
I try to use sitemesh instead of tiles; in my “decorator” template page I need to 
include a struts action.
I try to do this:
, but I catch the following
java.lang.IllegalStateException: Response has already been committed

Any suggestion?



Cerchi un laboratorio fotografico aperto 24 ore su 24?
Stampa le tue foto digitali su Kataweb e le ricevi a domicilio in 48 ore.
http://www.kataweb.it/foto


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



People Soft Component Interface

2004-06-04 Thread Zhang, Larry \(L.\)
Sorry for this off topic question, but I don't know which group I should post this 
question. I posted this on People Soft company discussion group, but no one answered 
my question.

EJB in Java as a technology has become more and more widely used to perform 
transaction (update, delete, insert) against database. When using Java to perform a 
People Soft 8 transaction, we need to communicate to People Soft 8 tables via 
Component Interface(a People Soft 8 Java term). My question is that does using 
Component Interface prevent we employee EJB? Do you or you know of some one using EJB 
to perform People Soft 8 transaction via Component Interface?

Thanks folks.

Larry Zhang 

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



RE: [OT] thick client functionality in the browser

2004-06-04 Thread Khalid K.
I have no objections :)

khalid

Quoting Frank Zammetti <[EMAIL PROTECTED]>:

> >Cheers for the span tip. It will reduce some of my needs for double
> >requests.  However sometimes the iframe saves requesting more than
> >necessary
> >in the response - eg when searching data, only replace the inside of the
> >iframe.
>
> You know, I'm sitting here wondering why I never just refreshed the
> iFrames?!?  Kind of DUH moment for me!
>
> On something else relevant... My applications are also frame-based, which I
> know many people hate, but that's something else that will allow you create
> richer interfaces in my opinion.  First, you can have portions of the screen
> that never change, that's what I've done a lot of.  All three applications
> that I referred to have similar appearance, that is, they start by opening a
> new window with no chrome (i.e., just an empty frame, no browser buttons or
> menus or anything), and in this I load a frameset that usually consists of a
> menubar up top, a bar on the left and a status bar on the bottom, plus a
> main frame in the middle of it all.  Only the middle frame ever changes, all
> the others are never loaded after the first time.  I change their content
> via script functions in an API.
>
> The API is the other important thing... I create a hidden frame (just set
> it's size to 0 in the frameset) and in this frame I load a large collection
> of script functions that are used throughout the application.  The benefit
> here is that all that stuff doesn't have to be retrieved with each request.
> So, these functions form an API for the application, maybe I have a
> setStatusMessgage() function, and a loadSidebar() function, things like
> that.
>
> What I do is when I call on the server to generate a page for the main
> frame, I display a "Please Wait" layer that is included in all the main
> pages the server renders.  I also hide the content in the other frames.  So,
> I get a nice waiting screen while the server is loading (usually with some
> kind of animation, a clock spinning for instance).  When the page is
> returned, it by default has the same Please Wait layer showing and it's main
> content hidden, the appearance is that the Please Wait screen is showing
> until the page is completely loaded.  Very nice.  Then I hide the Please
> wait layer and show the main content, but not before the appropriate
> functions in the API are called to set up the other frames (i.e., status
> message, links on the sidebar, etc).
>
> The other benefit to this hidden API frame is that you can store persistent
> data in there in JavaScript variables and use them on many different pages.
> This is how I do the client-side sorting stuff... I load an array in that
> frame, then render the mani frame's contents off that array.  When the user
> wants to sort by a different column, just call the sort() function and
> re-render the contents (done in one call actually).
>
> These are just some of the tricks I've developed over the years.  If anyone
> wants to discuss this further, I'm all for it, but I'm not sure how
> appropriate it is to the Struts list.  If people are interested though, and
> no one objects, it might make a nice thread, something like "Rich GUI
> tricks" or something.
>
> Frank
>
> >Daniel.
> >
> > > -Original Message-
> > > From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> > > Sent: 04 June 2004 17:08
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [OT] thick client functionality in the browser
> > >
> > >
> > >
> > > >I agree with this.  Our app is IE only, and it's amazing what you can
> >do.
> > > >IFRAME's make great scrollable tables.  The use of
> > > >document.getElementById("xxx").style.display="none" (or "") for
> > > >hiding/unhiding stuff is very extensive.
> > >
> > > You know what I discovered about a month ago?  Instead of using
> > > iFrames, you
> > > can get the same functionality with a  with
> > > style="overflow:scroll;".
> > > In every way I can determine, it looks and works the same, but
> > > now instead
> > > of either having the server serve a second page to populate the iFrame
> >or
> > > having script generate the HTML for it when the parent loads
> > > (which I did a
> > > lot of previously), you can how use regular JSP code (taglibs
> > > hopefully!) to
> > > generate the HTML inside the .  It speeds things up so much!
> > >
> > > >I disagree with the comment about layers tho.  Our jsps are still only
> > > >displaying stuff.  They arnt doing anything that the business
> > > layer should
> > > >atall.
> > > >
> > > >Javascript/dhtml is amazing if you persist with what you want.  I came
> > > >accross a webmail system the other day that i couldnt believe wasnt
> >using
> > > >anything else for gui!
> > >
> > > I agree, you certainly CAN maintain good architecture.  That's where my
> > > story about my past three apps came in, how the most recent was is
> > > infinitely better in terms of separation of layers.
> > >
> > > The point I was 

RE: [OT] thick client functionality in the browser

2004-06-04 Thread Frank Zammetti
Cheers for the span tip. It will reduce some of my needs for double
requests.  However sometimes the iframe saves requesting more than 
necessary
in the response - eg when searching data, only replace the inside of the
iframe.
You know, I'm sitting here wondering why I never just refreshed the 
iFrames?!?  Kind of DUH moment for me!

On something else relevant... My applications are also frame-based, which I 
know many people hate, but that's something else that will allow you create 
richer interfaces in my opinion.  First, you can have portions of the screen 
that never change, that's what I've done a lot of.  All three applications 
that I referred to have similar appearance, that is, they start by opening a 
new window with no chrome (i.e., just an empty frame, no browser buttons or 
menus or anything), and in this I load a frameset that usually consists of a 
menubar up top, a bar on the left and a status bar on the bottom, plus a 
main frame in the middle of it all.  Only the middle frame ever changes, all 
the others are never loaded after the first time.  I change their content 
via script functions in an API.

The API is the other important thing... I create a hidden frame (just set 
it's size to 0 in the frameset) and in this frame I load a large collection 
of script functions that are used throughout the application.  The benefit 
here is that all that stuff doesn't have to be retrieved with each request.  
So, these functions form an API for the application, maybe I have a 
setStatusMessgage() function, and a loadSidebar() function, things like 
that.

What I do is when I call on the server to generate a page for the main 
frame, I display a "Please Wait" layer that is included in all the main 
pages the server renders.  I also hide the content in the other frames.  So, 
I get a nice waiting screen while the server is loading (usually with some 
kind of animation, a clock spinning for instance).  When the page is 
returned, it by default has the same Please Wait layer showing and it's main 
content hidden, the appearance is that the Please Wait screen is showing 
until the page is completely loaded.  Very nice.  Then I hide the Please 
wait layer and show the main content, but not before the appropriate 
functions in the API are called to set up the other frames (i.e., status 
message, links on the sidebar, etc).

The other benefit to this hidden API frame is that you can store persistent 
data in there in JavaScript variables and use them on many different pages.  
This is how I do the client-side sorting stuff... I load an array in that 
frame, then render the mani frame's contents off that array.  When the user 
wants to sort by a different column, just call the sort() function and 
re-render the contents (done in one call actually).

These are just some of the tricks I've developed over the years.  If anyone 
wants to discuss this further, I'm all for it, but I'm not sure how 
appropriate it is to the Struts list.  If people are interested though, and 
no one objects, it might make a nice thread, something like "Rich GUI 
tricks" or something.

Frank
Daniel.
> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 17:08
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
>
> >I agree with this.  Our app is IE only, and it's amazing what you can 
do.
> >IFRAME's make great scrollable tables.  The use of
> >document.getElementById("xxx").style.display="none" (or "") for
> >hiding/unhiding stuff is very extensive.
>
> You know what I discovered about a month ago?  Instead of using
> iFrames, you
> can get the same functionality with a  with
> style="overflow:scroll;".
> In every way I can determine, it looks and works the same, but
> now instead
> of either having the server serve a second page to populate the iFrame 
or
> having script generate the HTML for it when the parent loads
> (which I did a
> lot of previously), you can how use regular JSP code (taglibs
> hopefully!) to
> generate the HTML inside the .  It speeds things up so much!
>
> >I disagree with the comment about layers tho.  Our jsps are still only
> >displaying stuff.  They arnt doing anything that the business
> layer should
> >atall.
> >
> >Javascript/dhtml is amazing if you persist with what you want.  I came
> >accross a webmail system the other day that i couldnt believe wasnt 
using
> >anything else for gui!
>
> I agree, you certainly CAN maintain good architecture.  That's where my
> story about my past three apps came in, how the most recent was is
> infinitely better in terms of separation of layers.
>
> The point I was trying to make, probably not very well, is that
> it's EASIER
> to screw up this way.  You can easily become tempted to put pieces of
> business logic in the view because you realize "gee, if I do x, y
> and z via
> scripting I don't have to have the server do it!".  Things like
> validations
> for example... just checkin

Deprecated Method

2004-06-04 Thread Jason L. West, Sr.
I am finishing up a series of WROX books that are focused on the
JSP/J2EE development with the last book of the series focusing on
developing Struts Applications.  Unfortunately the series was published
in early 2002 with focus on the Struts version 1.0.

One of the methods the book talks about has been deprecated with the
release of Struts version 1.1.  What I would like to know is new or
better method of doing the following:

public void reset(ActionMapping mapping, HttpServletRequest request) {
 ActionServlet servlet =  this.getServlet();
 MessageResources messageResources = servlet.getResources(); //
Deprecated

 storyTitle = 
messageResources.getMessage("javaedge.poststory.title.instructions");
 storyIntro =
messageResources.getMessage("javaedge.poststory.intro.instructions");
 storyBody  =
messageResources.getMessage("javaedge.poststory.body.instructions");
}

Any insight would be helpful.

Thanks
Jason L. West, Sr.
Internet Application Specialist, Sr.


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



RE: Alias names that can be used in javascript to reference when using multiple forms that could point to the same action?

2004-06-04 Thread Slattery, Tim - BLS
> My question is, does anything exist or will exist to refer to 
> a form in javascript without having to dive into a positional 
> array when having multiple html:form's tags pointing to the 
> same action?

Use the styleID attribute of the  tag. That resolves into the
"id" attribute of the HTML  tag. Then you can access that form from
Javascript using the "getElementById(...) function, which works on IE and
Mozilla based browsers.


--
Tim Slattery
[EMAIL PROTECTED]


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



RE: [OT] thick client functionality in the browser

2004-06-04 Thread Daniel Perry
I can see where you're going with the mixing of business logic and views.

I will admit that in parts i have done this.  A quick javascript check gives
a much quicker response that submit/redisplay form.  Especially when you get
some of the massive pages in our system.  One solution i had was to do both.
The javascript deals with validation, for the user, but the business logic
also validates data using actionforms, and only proceeds if it passes.

Cheers for the span tip. It will reduce some of my needs for double
requests.  However sometimes the iframe saves requesting more than necessary
in the response - eg when searching data, only replace the inside of the
iframe.

Daniel.

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 17:08
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
>
> >I agree with this.  Our app is IE only, and it's amazing what you can do.
> >IFRAME's make great scrollable tables.  The use of
> >document.getElementById("xxx").style.display="none" (or "") for
> >hiding/unhiding stuff is very extensive.
>
> You know what I discovered about a month ago?  Instead of using
> iFrames, you
> can get the same functionality with a  with
> style="overflow:scroll;".
> In every way I can determine, it looks and works the same, but
> now instead
> of either having the server serve a second page to populate the iFrame or
> having script generate the HTML for it when the parent loads
> (which I did a
> lot of previously), you can how use regular JSP code (taglibs
> hopefully!) to
> generate the HTML inside the .  It speeds things up so much!
>
> >I disagree with the comment about layers tho.  Our jsps are still only
> >displaying stuff.  They arnt doing anything that the business
> layer should
> >atall.
> >
> >Javascript/dhtml is amazing if you persist with what you want.  I came
> >accross a webmail system the other day that i couldnt believe wasnt using
> >anything else for gui!
>
> I agree, you certainly CAN maintain good architecture.  That's where my
> story about my past three apps came in, how the most recent was is
> infinitely better in terms of separation of layers.
>
> The point I was trying to make, probably not very well, is that
> it's EASIER
> to screw up this way.  You can easily become tempted to put pieces of
> business logic in the view because you realize "gee, if I do x, y
> and z via
> scripting I don't have to have the server do it!".  Things like
> validations
> for example... just checking if a field is filled in is of course
> fine to do
> with script, but if you start doing "if field X is greater than
> the maximum
> dollar amount allowed for this account" in script just because
> you happen to
> have that data on the client-side at the time, that's where you run into
> problems.  It's tempting because you CAN do it in script and the
> result is a
> snappier interface that is less error prone (because of reduced network
> activity and server load), but it's not good architecturally.
> It's not that
> dHTML and scripting MAKES you make bad choices, just that it
> makes it easier
> and more attractive in many cases.  That's what I was trying to say,
> hopefuly I did a better job this time :)
>
> >Daniel.
> >
> > > -Original Message-
> > > From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> > > Sent: 04 June 2004 16:41
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [OT] thick client functionality in the browser
> > >
> > >
> > > I've personally made something of a career out of doing what your
> >talking
> > > about.  The applications I've built at work are known to have very
> > > Windows-like look, feel and functionality, much more so than
> most other
> > > web-based applications.
> > >
> > > To pull it off, two things are true... first, it is IE only.  This is
> > > because of the secone: they are very heavily JavaScript, Dynamic HTML
> >and
> > > CSS-based GUIs.
> > >
> > > It *IS* possibly to do this type of thing in a cross-browser
> > > fashion, but I
> > > think it's fair to say it is considerably harder, and certainly more
> > > time-consuming.  Standardizing on IE for us was easy because it's
> >already
> > > the corporate standard, and is for 99% of our clients (the other 1% we
> > > simply tell they either use IE for at least our apps our they
> > > don't use the
> > > apps... not too nice in my mind, but it's been accepted thus far).
> > >
> > > Whether you try to do it cross-browser or not, most of your
> time will be
> > > spent doing scripting.  You can do some truly amazing things that
> > > will make
> > > you forget your looking at a web-based app, for the most part.
> > > You can also
> > > in many cases get much better performance because the more
> you do on the
> > > client (assuming it's not processor-intensive since your
> talking about
> >an
> > > interpreted scripting language), the better PERCIEVED performance the
> >app
> > > can have in many cases.  A 

Re: [OT] thick client functionality in the browser

2004-06-04 Thread Frank Zammetti
Geez, I hope your not talking about an app I did part of a couple of years 
ago! :)  Sounds very familiar... We had some Cobol jobs on a mainframe who's 
output we ran through something from IBM called Web Templates... It's meant 
to generate HTML, but instead we generated XML from it, then sent that XML 
to another server where it was processed via XSLT to generate the final 
HTML.  It was also rather script-heavy (eh, it was cool at the time, and I 
wasn't lead on the project, so I only accept partial blame! :) )

Frank

From: Bill Siggelkow <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [OT] thick client functionality in the browser
Date: Fri, 04 Jun 2004 12:04:36 -0400
I agree with Frank that -- it is amazing what you can do with JavaScript 
and IE-specific stuff.  A few jobs ago I had to inherit an heavy JavaScript 
app where the page was generated with XSLT.  I converted to use Struts but 
I had to preserve the JavaScript.  It is difficult to keep the MVC 
architecture -- one thing you can do is use Struts/JSTL tags to generate 
the JavaScript -- such as arrays, etc. The app I inherited was doing this 
using XSLT so it wasn't too difficult to migrate to Struts.  I didn't have 
access to JSTL at the time -- my guess it would have been even easier using 
JSTL (heck, I could have used the XML tags).

Bill
-
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: [OT] thick client functionality in the browser

2004-06-04 Thread Frank Zammetti

I agree with this.  Our app is IE only, and it's amazing what you can do.
IFRAME's make great scrollable tables.  The use of
document.getElementById("xxx").style.display="none" (or "") for
hiding/unhiding stuff is very extensive.
You know what I discovered about a month ago?  Instead of using iFrames, you 
can get the same functionality with a  with style="overflow:scroll;".  
In every way I can determine, it looks and works the same, but now instead 
of either having the server serve a second page to populate the iFrame or 
having script generate the HTML for it when the parent loads (which I did a 
lot of previously), you can how use regular JSP code (taglibs hopefully!) to 
generate the HTML inside the .  It speeds things up so much!

I disagree with the comment about layers tho.  Our jsps are still only
displaying stuff.  They arnt doing anything that the business layer should
atall.
Javascript/dhtml is amazing if you persist with what you want.  I came
accross a webmail system the other day that i couldnt believe wasnt using
anything else for gui!
I agree, you certainly CAN maintain good architecture.  That's where my 
story about my past three apps came in, how the most recent was is 
infinitely better in terms of separation of layers.

The point I was trying to make, probably not very well, is that it's EASIER 
to screw up this way.  You can easily become tempted to put pieces of 
business logic in the view because you realize "gee, if I do x, y and z via 
scripting I don't have to have the server do it!".  Things like validations 
for example... just checking if a field is filled in is of course fine to do 
with script, but if you start doing "if field X is greater than the maximum 
dollar amount allowed for this account" in script just because you happen to 
have that data on the client-side at the time, that's where you run into 
problems.  It's tempting because you CAN do it in script and the result is a 
snappier interface that is less error prone (because of reduced network 
activity and server load), but it's not good architecturally.  It's not that 
dHTML and scripting MAKES you make bad choices, just that it makes it easier 
and more attractive in many cases.  That's what I was trying to say, 
hopefuly I did a better job this time :)

Daniel.
> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 16:41
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
> I've personally made something of a career out of doing what your 
talking
> about.  The applications I've built at work are known to have very
> Windows-like look, feel and functionality, much more so than most other
> web-based applications.
>
> To pull it off, two things are true... first, it is IE only.  This is
> because of the secone: they are very heavily JavaScript, Dynamic HTML 
and
> CSS-based GUIs.
>
> It *IS* possibly to do this type of thing in a cross-browser
> fashion, but I
> think it's fair to say it is considerably harder, and certainly more
> time-consuming.  Standardizing on IE for us was easy because it's 
already
> the corporate standard, and is for 99% of our clients (the other 1% we
> simply tell they either use IE for at least our apps our they
> don't use the
> apps... not too nice in my mind, but it's been accepted thus far).
>
> Whether you try to do it cross-browser or not, most of your time will be
> spent doing scripting.  You can do some truly amazing things that
> will make
> you forget your looking at a web-based app, for the most part.
> You can also
> in many cases get much better performance because the more you do on the
> client (assuming it's not processor-intensive since your talking about 
an
> interpreted scripting language), the better PERCIEVED performance the 
app
> can have in many cases.  A good example is one application where I sort 
a
> returned list of search results on the browser as a result of a
> click of a
> column header in an iFrame, which makes it work just like a grid
> in Windows.
>   People love that, and so do the server admins since I'm not having the
> server sort search results.
>
> There are absolutely trade-offs you have to be aware of along the
> way, but
> this is the way I'm pulling it off, and the way I think most people are,
> without resorting to plug-ins, Flash, Applets, ActiveX and all
> that sort of
> stuff.  Pure HTML and JavaScript (well, as pure as you can get when it's
> IE-only!), and you get what you want without most of the headaches.
>
> The other big thing to consider is that you VERY quickly break "proper"
> application architecture, i.e., separation of layers.  It's almost
> unavoidable when your doing something like this unless you are
> exceptionally
> careful.  I've done three huge applications along these lines
> over the past
> four years, the first two were pretty poor in terms of
> separation, the third
> is actually very good, but I learned a lot of lessons from 

Re: [OT] thick client functionality in the browser

2004-06-04 Thread Bill Siggelkow
I agree with Frank that -- it is amazing what you can do with JavaScript 
and IE-specific stuff.  A few jobs ago I had to inherit an heavy 
JavaScript app where the page was generated with XSLT.  I converted to 
use Struts but I had to preserve the JavaScript.  It is difficult to 
keep the MVC architecture -- one thing you can do is use Struts/JSTL 
tags to generate the JavaScript -- such as arrays, etc. The app I 
inherited was doing this using XSLT so it wasn't too difficult to 
migrate to Struts.  I didn't have access to JSTL at the time -- my guess 
it would have been even easier using JSTL (heck, I could have used the 
XML tags).

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


RE: [OT] thick client functionality in the browser

2004-06-04 Thread Daniel Perry
I agree with this.  Our app is IE only, and it's amazing what you can do.
IFRAME's make great scrollable tables.  The use of
document.getElementById("xxx").style.display="none" (or "") for
hiding/unhiding stuff is very extensive.

I disagree with the comment about layers tho.  Our jsps are still only
displaying stuff.  They arnt doing anything that the business layer should
atall.

Javascript/dhtml is amazing if you persist with what you want.  I came
accross a webmail system the other day that i couldnt believe wasnt using
anything else for gui!

Daniel.

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 04 June 2004 16:41
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] thick client functionality in the browser
>
>
> I've personally made something of a career out of doing what your talking
> about.  The applications I've built at work are known to have very
> Windows-like look, feel and functionality, much more so than most other
> web-based applications.
>
> To pull it off, two things are true... first, it is IE only.  This is
> because of the secone: they are very heavily JavaScript, Dynamic HTML and
> CSS-based GUIs.
>
> It *IS* possibly to do this type of thing in a cross-browser
> fashion, but I
> think it's fair to say it is considerably harder, and certainly more
> time-consuming.  Standardizing on IE for us was easy because it's already
> the corporate standard, and is for 99% of our clients (the other 1% we
> simply tell they either use IE for at least our apps our they
> don't use the
> apps... not too nice in my mind, but it's been accepted thus far).
>
> Whether you try to do it cross-browser or not, most of your time will be
> spent doing scripting.  You can do some truly amazing things that
> will make
> you forget your looking at a web-based app, for the most part.
> You can also
> in many cases get much better performance because the more you do on the
> client (assuming it's not processor-intensive since your talking about an
> interpreted scripting language), the better PERCIEVED performance the app
> can have in many cases.  A good example is one application where I sort a
> returned list of search results on the browser as a result of a
> click of a
> column header in an iFrame, which makes it work just like a grid
> in Windows.
>   People love that, and so do the server admins since I'm not having the
> server sort search results.
>
> There are absolutely trade-offs you have to be aware of along the
> way, but
> this is the way I'm pulling it off, and the way I think most people are,
> without resorting to plug-ins, Flash, Applets, ActiveX and all
> that sort of
> stuff.  Pure HTML and JavaScript (well, as pure as you can get when it's
> IE-only!), and you get what you want without most of the headaches.
>
> The other big thing to consider is that you VERY quickly break "proper"
> application architecture, i.e., separation of layers.  It's almost
> unavoidable when your doing something like this unless you are
> exceptionally
> careful.  I've done three huge applications along these lines
> over the past
> four years, the first two were pretty poor in terms of
> separation, the third
> is actually very good, but I learned a lot of lessons from the first two,
> and even still there are things done that probably shouldn't be.  If this
> isn't your biggest concern (as it's not here since fulfilling client
> requests always trumps proper application development, bad as
> that may be in
> theory!), then it's fine.  If your an absolute architecture
> purist (i.e., if
> your a Ph.D, which we have way too many of these days!), then you'll
> probably fight such an approach tooth and nail, and continue to
> either (a)
> have trouble with how your applications work or (b) develop less powerful
> interfaces because your more concerned with the structure of an
> application
> than what it looks like and feels like and works like for an end user.
>
> Now that I've opened a theological nightmare here... ;)
>
> Frank
>
> >From: "Wennberg, Mathias" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Subject: [OT] thick client functionality in the browser
> >Date: Fri, 4 Jun 2004 10:25:41 -0500
> >
> >We're currently running a swing java webstart app but issues
> with clients
> >jvm
> >versions and permissions to install/update programs on their
> workstations
> >are
> >making us look into alternatives.
> >What are people out there using to get thick client functionality in the
> >browser? Ultimately it would work without any plug-ins and on
> all browsers,
> >but it's not necessary as long as it works on IE and doesn't use activeX.
> >
> >I'm also looking for comments and feedback on thinlets and canoo.
> >
> >Thanks.
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _

RE: [OT] thick client functionality in the browser

2004-06-04 Thread Geeta Ramani
Yes, quick, where did I misplace my medication..? ;)

> 
> Now that I've opened a theological nightmare here... ;)
> 
> Frank 

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



RE: Strus Web Service Enablement

2004-06-04 Thread Frank Zammetti
Point here, if I understood correctly, is that frank is implementing
The serverside part. So if you or I or anyone else would use his
package,
It will be for enabling an existing struts application to be called
As webservice.
That's spot-on.  I'd say if you were developing new services, or really 
doing more advanced Web Service-type things, this package probably isn't the 
right fit there.  But if your in a situation like I was a short time ago, 
where you have a big, exsiting Struts application, and someone wanted to 
access portions of it, this I think can be a quick and easy way to do that.

Specifically in my case I had another web application written by another 
group that wanted to access a list of items from my application.  Since my 
application is fairly well-written, I had beans that generated the list 
independant of the Actions, and I could have gone through the exercise of 
exposing those as as service.  But, I started thinking, wait, I have this 
whole server infrastructure, including in my case externalized security, and 
wouldn't it be nice if I could plug into that without touching any existing 
code?  Fortunately, I had done basically what this project is about three 
years ago in a home-grown framework, so it was trivial to port it to Struts, 
and it worked like a charm.

It's cases like this where I think this package could find some use, not in 
delivering oodles of new Web Services like many companies are doing.  There 
are far better options for that.

AFAIK, ultimately in an XML message everything will be reduced to a
String.
If u need for some reason to map it to a specific type, have a look at
The org.commons.beanutils.ConvertingWrapDynaBean class and see if it can
help
Yes, that's absolutely correct.  However, SOAP, as far as I know it, allows 
for more complex types to be encoded.  I assume it does some sort of 
serialization on it and stuffs the resultant bytestream into a CDATA 
element, or something of that nature.  On the server side, that stuff gets 
reconstituted and you wind up having your objects to work with, like 
BigDecimals, HashMaps or whatever else SOAP allows for.  My code won't 
handle such things at this point, and fundamentally I'm not sure it ever 
could, or even that it should.  When you consider that you are submitting 
your SOAP request to something that was meant to service HTML form 
submissions, which only deal in Strings, it makes sense that this would be a 
limitation of my approach, and it further makes sense that it's really not a 
limitation per se.

Dunno what the client would to though..
Regars
marco


In any case, you've given me some things to go Google now :)
Frank
>Pedro Salgado
>
>
> > Ah, I see.  I'm not familiar enough with filters, but I had always
> > thought  they were on the input side only.  If that belief is wrong,
> > then it  certainly becomes an option.
> >
> > I think at some point to make this really worth anything I'll have
to
> > break  my "transparency rule" to some extent.  I do like the idea of
> > generating the  output with a JSP because it's just so easy!  A
little
> > bit of background...  I actually implemented this same thing in a
custom
> > framework we were  previously using in-house.  In that application I
> > actually do write out the  output in servlets, there is never a
forward
> > to a JSP or anything else  typically in the "view" layer.
> >  This works
> > just fine, but when I started  doing it in Struts it ocurred to me
that
> > I could really simplify things by  not taking that approach and
instead
> > let the actual XML generation be done  in a JSP.  That also removed
the
> > one change that was required under the old  framework: you did have
to
> > add two function calls to the controller servlets  that were exposed
as
> > services.  Not a big change, but I wanted to avoid code  changes
> > entirely here.
> >
> > At this point my belief is that probably the best way to handle this
is
> > to  have an element added to the Action mappings in
Struts-Config.xml
> > that  specifies the target JSP for a Web Service request.  The
default
> > woudl be  the "generic" template I put together, although a bit more
> > flexible as time  goes on.  But, the point is that you could then
define
> > an XML template in  essence for every Action you wanted to expose as
a
> > service.  That would  allow for things I probably can't do
> > automatically.  I'd also write a taglib  to make life easier
(although I
> > might not have to... the current Struts  taglibs might be more than
> > sufficient on their own).
> >
> > That would of course require a change to the DTD for
Struts-Config.xml,
> > so  in the mean time what I think I'm going to do is add an optional
> > config file  thatwould be parsed via a plug-in at app startup that
would
> > contain these  extra mappings.  Fairly trivial exercise, and it
leaves
> > it completely  optional, no changes to Struts required.
> >
> > Also, I realized on the drive in that th

Struts dyanmic master detail form

2004-06-04 Thread shoaibm

Dear All,
we are trying to create a master detail form, where in rows can be added
dynamically on the client side can any body please tell me how to do it.
We cant use arrays of objects of line items beacus its size has to be
fixed.If we use Map we are not able to do the validations.Please guide .

Regards
Shoaib



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



RE: [OT] thick client functionality in the browser

2004-06-04 Thread Frank Zammetti
I've personally made something of a career out of doing what your talking 
about.  The applications I've built at work are known to have very 
Windows-like look, feel and functionality, much more so than most other 
web-based applications.

To pull it off, two things are true... first, it is IE only.  This is 
because of the secone: they are very heavily JavaScript, Dynamic HTML and 
CSS-based GUIs.

It *IS* possibly to do this type of thing in a cross-browser fashion, but I 
think it's fair to say it is considerably harder, and certainly more 
time-consuming.  Standardizing on IE for us was easy because it's already 
the corporate standard, and is for 99% of our clients (the other 1% we 
simply tell they either use IE for at least our apps our they don't use the 
apps... not too nice in my mind, but it's been accepted thus far).

Whether you try to do it cross-browser or not, most of your time will be 
spent doing scripting.  You can do some truly amazing things that will make 
you forget your looking at a web-based app, for the most part.  You can also 
in many cases get much better performance because the more you do on the 
client (assuming it's not processor-intensive since your talking about an 
interpreted scripting language), the better PERCIEVED performance the app 
can have in many cases.  A good example is one application where I sort a 
returned list of search results on the browser as a result of a click of a 
column header in an iFrame, which makes it work just like a grid in Windows. 
 People love that, and so do the server admins since I'm not having the 
server sort search results.

There are absolutely trade-offs you have to be aware of along the way, but 
this is the way I'm pulling it off, and the way I think most people are, 
without resorting to plug-ins, Flash, Applets, ActiveX and all that sort of 
stuff.  Pure HTML and JavaScript (well, as pure as you can get when it's 
IE-only!), and you get what you want without most of the headaches.

The other big thing to consider is that you VERY quickly break "proper" 
application architecture, i.e., separation of layers.  It's almost 
unavoidable when your doing something like this unless you are exceptionally 
careful.  I've done three huge applications along these lines over the past 
four years, the first two were pretty poor in terms of separation, the third 
is actually very good, but I learned a lot of lessons from the first two, 
and even still there are things done that probably shouldn't be.  If this 
isn't your biggest concern (as it's not here since fulfilling client 
requests always trumps proper application development, bad as that may be in 
theory!), then it's fine.  If your an absolute architecture purist (i.e., if 
your a Ph.D, which we have way too many of these days!), then you'll 
probably fight such an approach tooth and nail, and continue to either (a) 
have trouble with how your applications work or (b) develop less powerful 
interfaces because your more concerned with the structure of an application 
than what it looks like and feels like and works like for an end user.

Now that I've opened a theological nightmare here... ;)
Frank
From: "Wennberg, Mathias" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: [OT] thick client functionality in the browser
Date: Fri, 4 Jun 2004 10:25:41 -0500
We're currently running a swing java webstart app but issues with clients 
jvm
versions and permissions to install/update programs on their workstations 
are
making us look into alternatives.
What are people out there using to get thick client functionality in the
browser? Ultimately it would work without any plug-ins and on all browsers,
but it's not necessary as long as it works on IE and doesn't use activeX.

I'm also looking for comments and feedback on thinlets and canoo.
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/

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


RE: Alias names that can be used in javascript to reference when using multiple forms that could point to the same action?

2004-06-04 Thread Geeta Ramani
Hi Ken:

<2 p>
Multiple actions pointing to the same action and form is valid and will work.
 -Original Message-
> From: Linck, Ken [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 11:36 AM
> To: '[EMAIL PROTECTED]'
> Subject: Alias names that can be used in javascript to reference
>  when using multiple forms that could point to the same
> action?
 
  
> The only other solution I could think of is to define multiple actions
> pointing to the same action and form class(if thats possible) 
> but I did not
> try that and that seemed like overkill to me to solve a 
> javascript error at
> this point unless no other elegant solution was available.
>  
> Thanks for advice in adance.
>  
> 

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



CORRECTION: Alias names that can be used in javascript to refere nce ......................

2004-06-04 Thread Linck, Ken
==
Sorry, minor correction in example needed:

The java script should be

dosomething() {
  alert(document.somethingFormConfigOptionA.command.value);
  alert(document.somethingFormConfigOptionB.command.value);
} 
===

-Original Message-
From: Linck, Ken [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 04, 2004 11:36 AM
To: '[EMAIL PROTECTED]'
Subject: Alias names that can be used in javascript to reference  when using multiple forms that could point to the same action?

I am in the process of removing all our Struts 1.0 deprecated code in
anticipation of moving to Struts 1.2(when its release).  I was looking at
the  tag and how they removed the "name", "type", "scope"
attributes of the  tag stating that the action mapping will
determine these values.
 
My question is, does anything exist or will exist to refer to a form in
javascript without having to dive into a positional array when having
multiple html:form's tags pointing to the same action?(which maybe a bad
approach to begin with but at this point I am trying to avoid significant
changes to these jsps if possible).
 
Each  had a "name"(I consider it like an alias pre Struts 1.2)
which was being referenced in javascript.  When I removed the "name"
attribute, I think the javascript broke because it could not resolve
"somethingFormConfig1.command.value" since the alias no longer exists.
 
Code tidbit below:
 
==
Example that worked pre-Struts 1.2 and now broken:
 
dosomething() {
  alert(document.somethingFormConfig1.command.value);
  alert(document.somethingFormConfig2.command.value);
}
 


 
 


 
 
===
Struts 1.2 change I put in to make it work but does not seem as
elegant(being now positional):
 
dosomething() {
  alert(document.SomethingFormConfig[0].command.value);
  alert(document.SomethingFormConfig[1].command.value);
}
 


 
 


 
 

 
NOTE: Assume that the name is "SomethingFormConfig" in the struts-config.
 
The only other solution I could think of is to define multiple actions
pointing to the same action and form class(if thats possible) but I did not
try that and that seemed like overkill to me to solve a javascript error at
this point unless no other elegant solution was available.
 
Thanks for advice in adance.
 

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



Alias names that can be used in javascript to reference when using multiple forms that could point to the same action?

2004-06-04 Thread Linck, Ken
I am in the process of removing all our Struts 1.0 deprecated code in
anticipation of moving to Struts 1.2(when its release).  I was looking at
the  tag
and how they removed the "name", "type", "scope" attributes of the
 tag stating that the action mapping will determine these values.
 
My question is, does anything exist or will exist to refer to a form in
javascript without having to dive into a positional array when having
multiple html:form's tags pointing to the same action?(which maybe a bad
approach to begin with but at this point I am trying to avoid significant
changes to these jsps if possible).
 
Each  had a "name"(I consider it like an alias pre Struts 1.2)
which was being referenced in javascript.  When I removed the "name"
attribute, I think the javascript broke because it could not resolve
"somethingFormConfig1.command.value" since the alias no longer exists.
 
Code tidbit below:
 
==
Example that worked pre-Struts 1.2 and now broken:
 
dosomething() {
  alert(document.somethingFormConfig1.command.value);
  alert(document.somethingFormConfig2.command.value);
}
 




 




 
===
Struts 1.2 change I put in to make it work but does not seem as
elegant(being now positional):
 
dosomething() {
  alert(document.SomethingFormConfig[0].command.value);
  alert(document.SomethingFormConfig[1].command.value);
}
 




 




 

 
NOTE: Assume that the name is "SomethingFormConfig" in the struts-config.
 
The only other solution I could think of is to define multiple actions
pointing to the same action and form class(if thats possible) but I did not
try that and that seemed like overkill to me to solve a javascript error at
this point unless no other elegant solution was available.
 
Thanks for advice in adance.
 


[VERY OT] RE: JAVA & working in music

2004-06-04 Thread Smith, Darrin
There is a Borland newsgroup that could probably help with this off topic
issue.

Check into borland.public.jbuilder.ide for starters.

-Original Message-
From: Le Goff, Yoann [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 10:12 AM
To: 'Struts Users Mailing List'
Subject: JAVA & working in music


gotta small problem,
often when i'm working with JBuilder,
myWinamp die ...
 
it works again, only i restart the computer ...
 
somedy ever meet this problem ?
 
 
Y.
working in silence 

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



[OT] thick client functionality in the browser

2004-06-04 Thread Wennberg, Mathias
We're currently running a swing java webstart app but issues with clients jvm
versions and permissions to install/update programs on their workstations are
making us look into alternatives.
What are people out there using to get thick client functionality in the
browser? Ultimately it would work without any plug-ins and on all browsers,
but it's not necessary as long as it works on IE and doesn't use activeX.

I'm also looking for comments and feedback on thinlets and canoo.

Thanks.

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



JAVA & working in music

2004-06-04 Thread Le Goff, Yoann
gotta small problem,
often when i'm working with JBuilder,
myWinamp die ...
 
it works again, only i restart the computer ...
 
somedy ever meet this problem ?
 
 
Y.
working in silence 


RE: Strus Web Service Enablement

2004-06-04 Thread Marco Mistroni
Hi,

>   How could one use your RequestProcessor if I am using Axis and
>publishing web services through WSDD or JWS files?

Point here, if I understood correctly, is that frank is implementing
The serverside part. So if you or I or anyone else would use his
package,
It will be for enabling an existing struts application to be called
As webservice.

I have used axis long time ago (and not for an advanced example
either..), but  wouldn't it be enough if you construct a SOAP  message
and send it
To the struts app URL?
Will u have any drawback in doing that, if you abstract the way you call
The webservice?


Again, I m no expert with axis, but I thought there was an API that you
Can simply construct an XML message and post it to the webservice URL
(JAXM?)


>imitations of my code is that only Strings can currently be passed as 
>parameters to a service, and only Strings can be returned, so certainly
>much 
>of the full power of Web Services cannot be utilizied (and I'm not sure
I 
>see any way to change that based on what I've done), so it's possibly
>always 
>going to be of limited utility.  I don't expect that this is going to
be 
>useful for every Web Service situation, indeed it may only be useful in
>some 
>limited subset.

AFAIK, ultimately in an XML message everything will be reduced to a
String.
If u need for some reason to map it to a specific type, have a look at
The org.commons.beanutils.ConvertingWrapDynaBean class and see if it can
help


Dunno what the client would to though..

Regars
marco





In any case, you've given me some things to go Google now :)

Frank

>Pedro Salgado
>
>
> > Ah, I see.  I'm not familiar enough with filters, but I had always
> > thought  they were on the input side only.  If that belief is wrong,
> > then it  certainly becomes an option.
> >
> > I think at some point to make this really worth anything I'll have
to
> > break  my "transparency rule" to some extent.  I do like the idea of
> > generating the  output with a JSP because it's just so easy!  A
little
> > bit of background...  I actually implemented this same thing in a
custom
> > framework we were  previously using in-house.  In that application I
> > actually do write out the  output in servlets, there is never a
forward
> > to a JSP or anything else  typically in the "view" layer.
> >  This works
> > just fine, but when I started  doing it in Struts it ocurred to me
that
> > I could really simplify things by  not taking that approach and
instead
> > let the actual XML generation be done  in a JSP.  That also removed
the
> > one change that was required under the old  framework: you did have
to
> > add two function calls to the controller servlets  that were exposed
as
> > services.  Not a big change, but I wanted to avoid code  changes
> > entirely here.
> >
> > At this point my belief is that probably the best way to handle this
is
> > to  have an element added to the Action mappings in
Struts-Config.xml
> > that  specifies the target JSP for a Web Service request.  The
default
> > woudl be  the "generic" template I put together, although a bit more
> > flexible as time  goes on.  But, the point is that you could then
define
> > an XML template in  essence for every Action you wanted to expose as
a
> > service.  That would  allow for things I probably can't do
> > automatically.  I'd also write a taglib  to make life easier
(although I
> > might not have to... the current Struts  taglibs might be more than
> > sufficient on their own).
> >
> > That would of course require a change to the DTD for
Struts-Config.xml,
> > so  in the mean time what I think I'm going to do is add an optional
> > config file  thatwould be parsed via a plug-in at app startup that
would
> > contain these  extra mappings.  Fairly trivial exercise, and it
leaves
> > it completely  optional, no changes to Struts required.
> >
> > Also, I realized on the drive in that there's no need to put the
> > parameters  as a query string as I'm doing... I can just put the
parsed
> > parameters  directly into the request object as an attribute.  Since
> > only the second  pass of a Web Service request would know or care
about
> > that object, it will  basically just remove some code and simplify
> > things a bit.
> >
> > I'm hoping to get these thnigs done today and release a .02 package
> > before I  leave work today (it's nice when your development server
is
> > down and you  can't do any real work until the techs rebuild it!)...
I
> > also hope to remove  the required actionMappingPath element in the
XML
> > request... I haven't found  a way to get at the requested pat
> > information in RequestProcessor yet, but  it seems like something
that
> > should be available at that point, so I  probably just have to do
some
> > digging.
> >
> > What is AOP by the way?  Millions of acronyms out there, I know
> > thousands of  them, but not that one :)
> >
> > Thanks very much for the feedback!
> >
> > Frank
> >
> >>From: "Marco Mistroni" <[E

Re: Servlet filter

2004-06-04 Thread Nic Holbrook
I actually extended the Action class with a SecureAction class and 
created a Secure Action Mapping.  All actions that need to be secured 
extend this class.

In the struts config I have  for each action.  This way I validate at the role level for 
each action.  This works great since we build menus based on roles 
assigned to users.

Nic
Shilpa Vaidya wrote:
hey all,
Preventing users from accesing action. I am writing a web app to manage
administrators and profiles.
Administrators may access to the web app based on the profiles they have.
The profiles, determine which pages the administrator might access. The
profiles, and authorizations, might change online during work, so I need to
check authorization to access a page (Action) on each access.If I understand
correct, then, the actionServlet, first process the form bean, and then the
action..
But, if the user is not authorized to access a specific page (Action), I
need to forward him to an UnAuthorized error page, before thr formAction
bean is filled.
I would like to use a servlet filter. This filter checks the users rights
and instanciates a HttpServletRequest-Wrapper.But am not sure how - .Can
anyone help.Till then me trying to study the ServletFilter examples here n
there.
Shilpa


 


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


[struts-faces] tag with module

2004-06-04 Thread Ng Chong Hin NCS
Hi!

  Currently, I am in the midst of converting a working Struts application
(JSP/Tiles/Modules) to one that uses JSF, using the struts-faces integration
library.

  Having problems retrieving the messages from the
"message-module1.properties" resource (defined in the
struts-config-module1.xml).

  When attempting to use the message key like , an
exception is reported:

- Root Cause -
java.lang.NullPointerException
at
org.apache.jasper.runtime.BodyContentImpl.write(BodyContentImpl.java:195)
at
javax.faces.webapp.UIComponentTag$1.write(UIComponentTag.java:946)
at
com.sun.faces.renderkit.html_basic.HtmlResponseWriter.write(HtmlResponseWrit
er.java:519)
at
org.apache.struts.faces.renderer.WriteRenderer.encodeEnd(Unknown Source)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:713)
at
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:606)
at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:529)
at
org.apache.jsp.Messages_jsp._jspx_meth_s_message_0(Messages_jsp.java:264)
at
org.apache.jsp.Messages_jsp._jspx_meth_c_if_0(Messages_jsp.java:230)
at org.apache.jsp.Messages_jsp._jspService(Messages_jsp.java:88)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
10)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:684)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:575)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:498)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:8
22)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:398)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
at
org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)

  Some notes:
(1) I am running using Tomcat 4.1.20, J2SE 1.4.2_04, Struts 1.1, JSF RI
1.1 and struts-faces 0.5
(2) Have already defined 
(3) It is working if I use the  tag instead

  Any help or pointers would be appreciated.

  Thanks!

CH

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



RE: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Satish Kataria
Instead of you putting all the jar files in the WEB-INF/lib folder
I would suggest that create a directory structure for libraries aoutside
WEB-INF
Advantages  of this is this approach is cleaner and easily mantainable
as 
You can add any new libraries with minimum of effort

e.g the directory structure may look like

Application
libraries
struts
hibernate
Web-inf
lib
classes

And then use ant to include the jars in the classpath. All the web
containers garantee that if you 
put the path of all the libraries using the manifest.mf (which is
created when you create ur
Application's WAR file) then the web container will include them in ur
application's classpath

A sample ant target for including the path of libraries in manifest.mf
is given below






Where ${project.manifest.classpath}  contains the path of all the
libraries. This has to be relative to web application root and not
absolute path

myweb.war  --  the application's war file 
${jar.dir} -- the directory from which to jar the files 

Please revert to me in case you require any other details


Thanks,
Satish Kataria
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 04, 2004 9:29 AM
To: Struts Users Mailing List
Subject: Semi-OT: Organizing WEB-INF/lib dir...


Quick question for the people more versed in web apps than me, can you 
organized your libs in your WEB-INF/lib dir into separate sub dirs? I 
ask because my project is using Struts and Hibernate right now, and 
there is a such a mish-mash of JARs forming in my WEB-INF/lib dir, that 
its hard for me to upgrade the right jars when a new release comes out. 
I'd like to have something like:

WEB-INF/lib/struts
WEB-INF/lib/hibernate

or something to that extent. Can I do this?

TIA

-
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: Strus Web Service Enablement

2004-06-04 Thread Frank Zammetti
  For what I understood you are customizing the RequestProcessor to handle
SOAP message requests, right? I dont see Axis and any way of retrieving
the WSDL to make a direct call...
That is correct.  Any by "handling SOAP message requests", it really means 
"look for the SOAPAction header, if it's there, parse the message and create 
a query string from it, then forward the request back to itself in essence, 
with the query string attached".  It's a very rudimentary facility to be 
sure.

  If so, maybe instead of customizing the request processor, wouldn't it
be best to have a "SOAPform" to process the envelope and then populate
the bean? You could define the form-bean as your SOAPForm handler and a
regular action-mapping.
Hmm... If I understand your suggestion correctly, that would require a new 
class for any Action you want to expose, correct?  That's something I wanted 
to avoid.  It's good in the sense that no code has to change (config files 
don't count in my mind, so that's OK to do), and while adding a whole new 
class isn't as bad in my mind, it's still something I'd prefer to avoid if 
possible.

  With the help of Tiles one could define a template definition to return
the response in the appropriate format.
  Template:
  - soap header
  - soap body
  - soap footer
I haven't looked a Tiles at all yet (I'm actually fairly new to Struts 
still), so I can't really make any intelligent comment on this (except, I 
hope, for the comment that I can't make an intelligent comment on it! :) )

  How could one use your RequestProcessor if I am using Axis and
publishing web services through WSDD or JWS files?
I can't answer that either because while I know a little about Axis (a very 
little), I don't know anything about WSDD or JWS.

  I am new to web services but I found very usefull wsdl2java and have my
clients process their requests in a somewhat transparent way through the
use of SoapBindingStubs.
  It seems that with your approach I can't call a web service with these
stubs but, instead, need to implement some
SOAPMessageBuilder+Marshalling/Unmarshalling of JavaBeans to send SOAP
messages, something that with JWS files, for example, is completely
transparent.
I *believe* these stubs will work, indeed they SHOULD.  One thing I'm going 
to try and do today is write a WSDL file for my sample service and see if 
the client that JDeveloper can generate from it works.  In theory it should, 
if it doesn't then obviously I've done something very wrong.  One of the 
limitations of my code is that only Strings can currently be passed as 
parameters to a service, and only Strings can be returned, so certainly much 
of the full power of Web Services cannot be utilizied (and I'm not sure I 
see any way to change that based on what I've done), so it's possibly always 
going to be of limited utility.  I don't expect that this is going to be 
useful for every Web Service situation, indeed it may only be useful in some 
limited subset.

In any case, you've given me some things to go Google now :)
Frank
Pedro Salgado
> Ah, I see.  I'm not familiar enough with filters, but I had always
> thought  they were on the input side only.  If that belief is wrong,
> then it  certainly becomes an option.
>
> I think at some point to make this really worth anything I'll have to
> break  my "transparency rule" to some extent.  I do like the idea of
> generating the  output with a JSP because it's just so easy!  A little
> bit of background...  I actually implemented this same thing in a custom
> framework we were  previously using in-house.  In that application I
> actually do write out the  output in servlets, there is never a forward
> to a JSP or anything else  typically in the "view" layer.
>  This works
> just fine, but when I started  doing it in Struts it ocurred to me that
> I could really simplify things by  not taking that approach and instead
> let the actual XML generation be done  in a JSP.  That also removed the
> one change that was required under the old  framework: you did have to
> add two function calls to the controller servlets  that were exposed as
> services.  Not a big change, but I wanted to avoid code  changes
> entirely here.
>
> At this point my belief is that probably the best way to handle this is
> to  have an element added to the Action mappings in Struts-Config.xml
> that  specifies the target JSP for a Web Service request.  The default
> woudl be  the "generic" template I put together, although a bit more
> flexible as time  goes on.  But, the point is that you could then define
> an XML template in  essence for every Action you wanted to expose as a
> service.  That would  allow for things I probably can't do
> automatically.  I'd also write a taglib  to make life easier (although I
> might not have to... the current Struts  taglibs might be more than
> sufficient on their own).
>
> That would of course require a change to the DTD for Struts-Config.xml,
> so  in the mean time what I think I'm goi

Re: Transition after registering new user

2004-06-04 Thread Bill Siggelkow
quickrobert:
Just taking some guesses here ...
Does the user pass authentication when the login after registration?  If 
not, then it sounds like that JBoss is not rereading the security info 
from the database.  If so, then you may need to "fake" the login by 
programmatically going through j_security_check on registration.

Probably the JBoss forums are a better source for this kind of question...
fastbob wrote:
Greetings,
I have an application using Struts 1.1 and JBoss 3.2.3. Authentication is
Forms-based using JAAS. The username and password are pulled from the
database through j_security_check and several authorization levels are
defined through security-constraints. Login works fine. 

I'm now trying to add a new user registration page. If the registration
succeeds, the user should be logged in automatically and taken to a welcome
page. From the welcome page they should be able the access the application.
The registration info is added to the database and the user is logged in via
javax.security.auth.loginjavax.security.auth.login. Then my registration
forwards to the welcome page. Unfortunately, when the welcome page is
displayed, the user does not appear to be logged in. Clicking on any link
for the application takes them to the login page.
What am I missing?
Thanks.
fastbob

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


RE: [OT] Good env for struts-based-web-tier and ejb components development

2004-06-04 Thread Frank Zammetti
No, it does not.  UltraEdit is a top-notch text editor, many people 
(including me) think it's the best, but it doesn't have too much in the way 
of "IDE-like" functionality.  The only things I can think of actually is a 
function list and syntax coloring for various languages.  Oh yeah, and 
auto-bracketing of blocks I think.

Your characterization of this discussion is spot on by the way :)  It's kind 
of like that discussion of the best programming language.  Pointless 
ultimately because a good coder can be successul in most any language 
(except for Logo I guess, and I'm not wiling to say Quake hasn't been ported 
to Logo! :) )


From: "Geeta Ramani" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: [OT] Good env for struts-based-web-tier and ejb components 
development
Date: Fri, 4 Jun 2004 10:04:50 -0400

Frank:
I know better than to join in these (un)holy wars, but I don't know 
anything about ultra-edit so am curious: ultra-edit doesn't have command 
completion, does it? That's almost the only thing I have found I like about 
an IDE, and feel I can't do without..

..but i agree with you: ultimately it's the coder and not the tools that 
count..:)
Geeta

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] Good env for struts-based-web-tier and ejb
> components
> development
> I don't think either way of thinking is better than the other
> frankly, I
> think people can be just as productive either way if they are
> comfortable
> with the tools they are using.
>
> Frank
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get fast, reliable Internet access with MSN 9 Dial-up – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/

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


RE: HTTP header for dynamic pdf and IE6

2004-06-04 Thread Frank Zammetti
I'm doing this as well, and three things come to mind...
(1) For IE, you must set the response size or it'll choke.  Looks like your 
doing that already.
(2) Try adding response.setContentType("application/pdf"); to your code.  
That's the only extra thing I'm doing in my code.
(3) Acrobat integration with IE is known to be buggy, and that's being 
polite!  In Acrobat itself, there is an option to specify whether the PDF is 
opened integrated in the browser or in a separate window.  The former is 
many times problematic.  Try changing that option and see if your problem 
goes away.  In Acorbat 6.0, it's under the Edit menu, Preferences, the 
Internet "tab", and it's the Display PDF In Browser option.  Uncheck it, 
close Acrobat (make sure it's really closed, I find the Acrobat process 
keeps running most of the time, very annoying) and give it a try.

Hope that helps!
Frank

From: "Dean A. Hoover" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: HTTP header for dynamic pdf and IE6
Date: Fri, 04 Jun 2004 08:37:45 -0400
Sorry if this is inappropriate for this list,
but I really don't know where else to turn. I
figured someone on this list may have solved it.
I have a java web application that allows
an end-user in their browser to download
a "file", which happens to be bytes stored
in a database.
In experimenting with how to do this, I have
this snippet of code in my Action:
   AttachmentListItem attachment =
EmailSQL.getAttachmentListItem(connection, 3, 1);
   response.setContentType(attachment.getContentType());
   byte[] data =
EmailSQL.getAttachmentBytes(connection, 3, 1);
   response.setContentLength(data.length);
   response.setHeader("Content-Disposition",
"attachment; filename=\"" + attachment.getFileName() + "\"");
   ServletOutputStream out = response.getOutputStream();
   out.write(data);
   out.flush();
   out.close();
To test this out, I hit the link in my IE browser which brings up
a dialog box allowing me to "Open" or "Save" the file. If I save
the file, it does the right thing. If I press the open button, Acrobat
Reader opens up and then errors out with an alert box:
"There was an error opening the document. The file does not exist."
I have a yahoo email account that I tried a test on. I sent an email
message with the same pdf file attached to that account. I wanted to
see if yahoo figured out how to make this work. They did! (but I can't
figure out how to replicate)
Their header looks like this:
Date: Thu, 03 Jun 2004 15:37:58 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Content-Disposition: attachment; filename=reference.pdf
Connection: close
Transfer-Encoding: chunked
Content-Type: application/pdf; filename="foo.bar"
.s4g--&v=1
There is also some other stuff I am seeing just after the header: .s4g-&v=1
which looks something like a query string, but I'm not sure.
My header looks like this:
HTTP/1.1 200 OK
Date: Thu, 03 Jun 2004 15:35:15 GMT
Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a
Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Disposition: attachment; filename="reference.pdf"
Content-Length: 214982
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf;charset=UTF-8
Does anyone know how to work around this problem? I suppose
there are actually 2 parts to this:
1) What is the magic in the HTTP header that allows this to work?
2) How can one create such a header in java?
Thanks.
Dean Hoover


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reload Ressources on the fly

2004-06-04 Thread James Mitchell
I don't think that's what Mr. "Newsletter" meant.

You cannot reload message resources without modifying Struts and building
your own custom version.  This is due to MessageResources caching the
fomatted strings.  This will happen with a custom MessageResources
implementation as well.  The only way around it would be to clear the cache
with each call, which I don't recommend for anything outside of development.


--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx


- Original Message -
From: "Raphaël di Cicco" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, June 04, 2004 10:10 AM
Subject: Re: Reload Ressources on the fly


> Eclipse (www.eclipse.org )does that for you.
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 04, 2004 4:15 PM
> Subject: Reload Ressources on the fly
>
>
> > Hi,
> > i am quite a newbie to struts and now i want to know, if there is a
chance
> to reload the messageressources after a change without restarting the
> server.
> > Greetz
> > Olli
> >
> >
> >
> >
> >
> >
> > -
> > 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: and get...()

2004-06-04 Thread Bill Siggelkow
The reason you "System.out.print(foo.getBar())" printed "null" is 
because that is how the print method is written. If the returned value 
of the method is actually null then the "print" method 
prints the value "null".

Long story short, what you are seeing is result of calling 
"System.out.print" not the result of the returned property value.

Kapisch(sic?)?
Marcelo Epstein wrote:
Hi,
When I use  if the value is null, the tag returns "".
But, when I try, for example, System.out.print(xxx.getProperty()) inside an Action and the property is null. It returns the String "null". 
What is the best practice to avoid printing "null" ? I have to check all values before printing? Is there a better way to do that?

Thanks in advance,
Marcelo

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


Re: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Frank Zammetti
If they are dependant on different versions of the same JAR, I suspect 
you'll run into problems no matter what you do.  I guess you have it working 
somehow now, which is a bit surprising to me!  If I understood you 
correctly, you may want to see if the different versions are really 
required, i.e., can you just take the latest JAR and have everything work 
with that?

Frank

From: Riyad Kalla <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Semi-OT: Organizing WEB-INF/lib dir...
Date: Fri, 04 Jun 2004 07:12:37 -0700
Frank,
Great suggestion, I'll look into doing this as it is troublesome that 
hibernate and struts have the same deps (diff vers) on most of commons

Frank Zammetti wrote:
I'm pretty sure the answer is no. I just took all the JARs for a test app 
I had installed and moved them from WEB-INF/lib to WEB-INF/lib/stuff, and 
the app no longer works. This is in Tomcat, so possibly it would work with 
another app server, but I tend to doubt it.

One suggestion that I can make, a habit I've gotten into, is name your 
JARs liberally, since their names don't matter. I usually name the JARs as 
descriptively as possible (for example, 
"jakarta-taglibs-standard-1.1.0.jar" might be one) and include their 
version, so it's fairly easy to tradk down what's what and at a glance 
tell what versions I'm running. Probably not the ideal answer, but maybe 
it'll clean up the mess just a little.

Frank

From: Riyad Kalla <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Semi-OT: Organizing WEB-INF/lib dir...
Date: Thu, 03 Jun 2004 20:58:36 -0700
Quick question for the people more versed in web apps than me, can you 
organized your libs in your WEB-INF/lib dir into separate sub dirs? I ask 
because my project is using Struts and Hibernate right now, and there is 
a such a mish-mash of JARs forming in my WEB-INF/lib dir, that its hard 
for me to upgrade the right jars when a new release comes out. I'd like 
to have something like:

WEB-INF/lib/struts
WEB-INF/lib/hibernate
or something to that extent. Can I do this?
TIA
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/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]
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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


Re: Reload Ressources on the fly

2004-06-04 Thread Raphaël di Cicco
Eclipse (www.eclipse.org )does that for you.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 04, 2004 4:15 PM
Subject: Reload Ressources on the fly


> Hi,
> i am quite a newbie to struts and now i want to know, if there is a chance
to reload the messageressources after a change without restarting the
server.
> Greetz
> Olli
>
>
>
>
>
>
> -
> 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: Sorry : Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Frank Zammetti
Geez, and I just replied to your post! :)  I guess you can ignore my post 
too.


From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
CC: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Sorry : Semi-OT: Organizing WEB-INF/lib dir...
Date: Fri, 4 Jun 2004 11:34:10 +0530
I think I am wrong. my experiment went a little wrong. soory about that. I
think lib cannot be subdivided.
Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

"Dan Tran" <[EMAIL PROTECTED]>
06/04/2004 11:23 AM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>
To
"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc
Subject
Re: Semi-OT: Organizing WEB-INF/lib dir...


Dont think jsp/servlet specs allows splitting of the lib
dir.  You may want to take a look at maven.apache.org
or use the way Maven names it dependencies jar files
good luck.
-Dan
- Original Message -
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 10:29 PM
Subject: RE: Semi-OT: Organizing WEB-INF/lib dir...
> What IDE are you using? Can't it help you with this?
>
> JBuilder certainly spares me this hassle (okay, that's not all good.
> I've had some *other* hassles* because of it, but they are certainly
> worth it).
>
> > -Original Message-
> > From: Riyad Kalla [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 03, 2004 11:59 PM
> > To: Struts Users Mailing List
> > Subject: Semi-OT: Organizing WEB-INF/lib dir...
> >
> >
> > Quick question for the people more versed in web apps than
> > me, can you
> > organized your libs in your WEB-INF/lib dir into separate sub dirs? I
> > ask because my project is using Struts and Hibernate right now, and
> > there is a such a mish-mash of JARs forming in my WEB-INF/lib
> > dir, that
> > its hard for me to upgrade the right jars when a new release
> > comes out.
> > I'd like to have something like:
> >
> > WEB-INF/lib/struts
> > WEB-INF/lib/hibernate
> >
> > or something to that extent. Can I do this?
> >
> > TIA
> >
> > -
> > 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]
ForwardSourceID:NTAB2E
<< InterScan_Disclaimer.txt >>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/

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


Reload Ressources on the fly

2004-06-04 Thread struts_newsletter
Hi,
i am quite a newbie to struts and now i want to know, if there is a chance to reload 
the messageressources after a change without restarting the server.
Greetz
Olli






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



RE: [OT] Good env for struts-based-web-tier and ejb components development

2004-06-04 Thread Geeta Ramani
Frank:

I know better than to join in these (un)holy wars, but I don't know anything about 
ultra-edit so am curious: ultra-edit doesn't have command completion, does it? That's 
almost the only thing I have found I like about an IDE, and feel I can't do without..

..but i agree with you: ultimately it's the coder and not the tools that count..:)
Geeta

> -Original Message-
> From: Frank Zammetti [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [OT] Good env for struts-based-web-tier and ejb 
> components
> development 
 
> I don't think either way of thinking is better than the other 
> frankly, I 
> think people can be just as productive either way if they are 
> comfortable 
> with the tools they are using.
> 
> Frank 

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



Re: Sorry : Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Riyad Kalla
This is also a very good suggestion, thanks Mark!
Mark Lowe wrote:
I think you perhaps what to organise you jars in a central place like
~/Projects/lib/struts-1.1
~/Projects/lib/hibernate-2.1
~/Projects/myapp/src
and such like
and then use ant to copy the dependencies into
~/Projects/myapp/build/WEB-INF/lib
at build time with an ant task.
This will give you the clarity of centralising your jars while not  
comprimising anything with the container spec.

Mark
On 4 Jun 2004, at 08:04, [EMAIL PROTECTED] wrote:
I think I am wrong. my experiment went a little wrong. soory about  
that. I think lib cannot be subdivided.

 Brati Sankar Ghosh
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com

"Dan Tran" <[EMAIL PROTECTED]>
06/04/2004 11:23 AM
Please respond to
 "Struts Users Mailing List" <[EMAIL PROTECTED]>

To
"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc
Subject
Re: Semi-OT: Organizing WEB-INF/lib dir...



Dont think jsp/servlet specs allows splitting of the lib
 dir.  You may want to take a look at maven.apache.org
 or use the way Maven names it dependencies jar files
 good luck.
 -Dan
 - Original Message -
 From: "Joe Hertz" <[EMAIL PROTECTED]>
 To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
 Sent: Thursday, June 03, 2004 10:29 PM
 Subject: RE: Semi-OT: Organizing WEB-INF/lib dir...
 > What IDE are you using? Can't it help you with this?
 >
 > JBuilder certainly spares me this hassle (okay, that's not all good.
 > I've had some *other* hassles* because of it, but they are certainly
 > worth it).
 >
 > > -Original Message-
 > > From: Riyad Kalla [mailto:[EMAIL PROTECTED]
 > > Sent: Thursday, June 03, 2004 11:59 PM
 > > To: Struts Users Mailing List
 > > Subject: Semi-OT: Organizing WEB-INF/lib dir...
 > >
 > >
 > > Quick question for the people more versed in web apps than
 > > me, can you
 > > organized your libs in your WEB-INF/lib dir into separate sub  
dirs? I
 > > ask because my project is using Struts and Hibernate right now,  
and
 > > there is a such a mish-mash of JARs forming in my WEB-INF/lib
 > > dir, that
 > > its hard for me to upgrade the right jars when a new release
 > > comes out.
 > > I'd like to have something like:
 > >
 > > WEB-INF/lib/struts
 > > WEB-INF/lib/hibernate
 > >
 > > or something to that extent. Can I do this?
 > >
 > > TIA
 > >
 > >  
-
 > > 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]
ForwardSourceID:NTAB2E
- 

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: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Frank Zammetti
Sure, if you added it to the classpath it will work.  But the benefit of 
WEB-INF/lib is that things in there are loaded as needed, you don't have to 
put any of it on the classpath.

Most app servers I believe follow the pattern Tomcat does, which is that 
there is a common folder that you can put JARs in that will be loaded as 
needed and are accessible to all webapps.  Then there is WEB-INF/lib which 
is specific to a given webapp.  In addition to both of those, anything on 
the system classpath is accessible as well.

The point though is that if you put that folder under lib and do NOT added 
it to your classpath, will it still work?  Even if it does, is JDeveloepr 
doing anything for you in the background to make it work?

Frank

From: [EMAIL PROTECTED]
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: RE: Semi-OT: Organizing WEB-INF/lib dir...
Date: Fri, 4 Jun 2004 10:05:42 +0530
Well I have done that. I have created a directory under lib and included
struts.jar in it. This is running fine in JDeveloper when I added the path
to the classpath.
Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

"Frank Zammetti" <[EMAIL PROTECTED]>
06/04/2004 09:41 AM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>
To
[EMAIL PROTECTED]
cc
Subject
RE: Semi-OT: Organizing WEB-INF/lib dir...


I'm pretty sure the answer is no.  I just took all the JARs for a test app
I
had installed and moved them from WEB-INF/lib to WEB-INF/lib/stuff, and
the
app no longer works.  This is in Tomcat, so possibly it would work with
another app server, but I tend to doubt it.
One suggestion that I can make, a habit I've gotten into, is name your
JARs
liberally, since their names don't matter.  I usually name the JARs as
descriptively as possible (for example,
"jakarta-taglibs-standard-1.1.0.jar"
might be one) and include their version, so it's fairly easy to tradk down
what's what and at a glance tell what versions I'm running.  Probably not
the ideal answer, but maybe it'll clean up the mess just a little.
Frank
>From: Riyad Kalla <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: Semi-OT: Organizing WEB-INF/lib dir...
>Date: Thu, 03 Jun 2004 20:58:36 -0700
>
>Quick question for the people more versed in web apps than me, can you
>organized your libs in your WEB-INF/lib dir into separate sub dirs? I ask
>because my project is using Struts and Hibernate right now, and there is
a
>such a mish-mash of JARs forming in my WEB-INF/lib dir, that its hard for
>me to upgrade the right jars when a new release comes out. I'd like to
have
>something like:
>
>WEB-INF/lib/struts
>WEB-INF/lib/hibernate
>
>or something to that extent. Can I do this?
>
>TIA
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
_
MSN 9 Dial-up Internet Access fights spam and pop-ups ? now 3 months FREE!
http://join.msn.click-url.com/go/onm00200361ave/direct/01/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NTAA96
<< InterScan_Disclaimer.txt >>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get fast, reliable Internet access with MSN 9 Dial-up – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/

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


Re: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Riyad Kalla
Good idea, Maven would certainly have more requirements than I do :D
Dan Tran wrote:
Dont think jsp/servlet specs allows splitting of the lib
dir.  You may want to take a look at maven.apache.org
or use the way Maven names it dependencies jar files
good luck.
-Dan
- Original Message - 
From: "Joe Hertz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 10:29 PM
Subject: RE: Semi-OT: Organizing WEB-INF/lib dir...

 

What IDE are you using? Can't it help you with this? 

JBuilder certainly spares me this hassle (okay, that's not all good.
I've had some *other* hassles* because of it, but they are certainly
worth it).
   

-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 03, 2004 11:59 PM
To: Struts Users Mailing List
Subject: Semi-OT: Organizing WEB-INF/lib dir...

Quick question for the people more versed in web apps than 
me, can you 
organized your libs in your WEB-INF/lib dir into separate sub dirs? I 
ask because my project is using Struts and Hibernate right now, and 
there is a such a mish-mash of JARs forming in my WEB-INF/lib 
dir, that 
its hard for me to upgrade the right jars when a new release 
comes out. 
I'd like to have something like:

WEB-INF/lib/struts
WEB-INF/lib/hibernate
or something to that extent. Can I do this?
TIA
-
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: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Riyad Kalla
Eclipse + MyEclipse
Joe Hertz wrote:
What IDE are you using? Can't it help you with this? 

JBuilder certainly spares me this hassle (okay, that's not all good.
I've had some *other* hassles* because of it, but they are certainly
worth it).
 

-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 03, 2004 11:59 PM
To: Struts Users Mailing List
Subject: Semi-OT: Organizing WEB-INF/lib dir...

Quick question for the people more versed in web apps than 
me, can you 
organized your libs in your WEB-INF/lib dir into separate sub dirs? I 
ask because my project is using Struts and Hibernate right now, and 
there is a such a mish-mash of JARs forming in my WEB-INF/lib 
dir, that 
its hard for me to upgrade the right jars when a new release 
comes out. 
I'd like to have something like:

WEB-INF/lib/struts
WEB-INF/lib/hibernate
or something to that extent. Can I do this?
TIA
-
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: Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Riyad Kalla
Frank,
Great suggestion, I'll look into doing this as it is troublesome that 
hibernate and struts have the same deps (diff vers) on most of commons

Frank Zammetti wrote:
I'm pretty sure the answer is no. I just took all the JARs for a test 
app I had installed and moved them from WEB-INF/lib to 
WEB-INF/lib/stuff, and the app no longer works. This is in Tomcat, so 
possibly it would work with another app server, but I tend to doubt it.

One suggestion that I can make, a habit I've gotten into, is name your 
JARs liberally, since their names don't matter. I usually name the 
JARs as descriptively as possible (for example, 
"jakarta-taglibs-standard-1.1.0.jar" might be one) and include their 
version, so it's fairly easy to tradk down what's what and at a glance 
tell what versions I'm running. Probably not the ideal answer, but 
maybe it'll clean up the mess just a little.

Frank

From: Riyad Kalla <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Semi-OT: Organizing WEB-INF/lib dir...
Date: Thu, 03 Jun 2004 20:58:36 -0700
Quick question for the people more versed in web apps than me, can 
you organized your libs in your WEB-INF/lib dir into separate sub 
dirs? I ask because my project is using Struts and Hibernate right 
now, and there is a such a mish-mash of JARs forming in my 
WEB-INF/lib dir, that its hard for me to upgrade the right jars when 
a new release comes out. I'd like to have something like:

WEB-INF/lib/struts
WEB-INF/lib/hibernate
or something to that extent. Can I do this?
TIA
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months 
FREE! http://join.msn.click-url.com/go/onm00200361ave/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] Good env for struts-based-web-tier and ejb components development

2004-06-04 Thread Frank Zammetti
Just curious, why do you say UltraEdit isn't good for Java development?
It seems like, and this is the case here at work as well, that there is two 
schools of thought... one group says that IDEs and the like are better 
because of all the added development-specific tools you get (i.e., code 
insight, perspectives, generators, etc.), and the other school says that 
since programming is mostly text editing anyway, then a good text editor is 
all you really need.

I think if your thinking is in the first group to begin with, then 
regardless of how good a text editor anything is your not going to like it.  
Likewise, if your comfortable with just a good text editor, an IDE feels 
like unneeded baggage.

I don't think either way of thinking is better than the other frankly, I 
think people can be just as productive either way if they are comfortable 
with the tools they are using.

Frank
From: "Navjot Singh" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: [OT] Good env for struts-based-web-tier and ejb components 
development
Date: Fri, 4 Jun 2004 12:42:32 +0530

Thx for your inputs guys.
Ultraedit is good but not good for java development. I have been using it
for perl.
Jedit is also good but not as good as eclipse.
I have decided to adopt Eclipse+(MyEclipse+XDoclet)+Ant to start my 
project.
Quite powerful combination for me.

thx again.
navjot
>-Original Message-
>From: Andrea M. [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 03, 2004 8:37 PM
>To: 'Struts Users Mailing List'
>Subject: R: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>
>Mah
>Sincerely... there are features in IDEs that I don't know how would I do
>without.. like code insight... web descriptor (and even struts 
descriptor)
>editing.. and so on
>
>Of course I could do everything with notepad, but that often means 
getting
>crazy just to find a simple syntax error, or event to remember
>which methods
>are you inheriting up to the three.
>Noway.. I'll be a geek if you like but I don’t like to suffer with no
>reason.
>
>
>
>-Messaggio originale-
>Da: Marco Mistroni [mailto:[EMAIL PROTECTED]
>Inviato: giovedì 3 giugno 2004 15.50
>A: 'Struts Users Mailing List'
>Oggetto: RE: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>Hi there,
>	Jedit+xdoclet+mysql+junit+dbunit+maven
>
>And u would write code, generate what u need, test it and deploy
>It with one click..
>
>IDE r powerful, no doubt on that, but I prefer plain old notepad..
>If u end up getting acquainted with a powerful IDE, then as soon
>As u change it u get lost
>
>My 2 cents
>
>Regards
>	marco
>
>
>
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: 03 June 2004 06:12
>To: Struts Users Mailing List
>Subject: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>Hi List,
>
>I am about to start development work on some auction site which in
>principle
>is similar to e-bay but not of that scale. I will be using J2EE+Jboss.
>
>What kind of IDE development environment do you guys use for the
>development?
>
>I just tried Eclipse + EasyStruts + Lomboz. Lomboz is good but not good
>enough.
>
>1. I still have to carefully edit ejb-jar and jboss files to make my
>things
>run.
>2. The directory structure that it creates in the background is not
>good.
>3. The xdoclet tags that it generates is for all servers. e.g JOnAs
>jboss,
>weblogic. but i need for only jboss.
>4. The build files that it generates are bit obscure.
>
>Easy Struts is just OK and doesn't provide much time saving to me. I can
>live without it also. Moreover, EasyStruts doesn't work with Eclipse
>3.0.
>
>In nutshell, the entire development environment becomes unorganized, if
>not
>complex.
>
>I wish to know what kinda env do you use? How do streamline your
>development
>process?
>
>TIA
>Navjot Singh
>
>
>-
>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]
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

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

Re: HTTP header for dynamic pdf and IE6

2004-06-04 Thread Dean A. Hoover
Sorry its not clear, but the filename does end in .pdf
Dean
Mark Lowe wrote:
I'm not sure, but i think bill thought the world a better place if 
applications associate file types according to the file suffix.

it will need .pdf at the end of the filename.
filename=\"" + attachment.getFileName() + "\".pdf"
could fix it.
On 4 Jun 2004, at 14:37, Dean A. Hoover wrote:
Sorry if this is inappropriate for this list,
but I really don't know where else to turn. I
figured someone on this list may have solved it.
I have a java web application that allows
an end-user in their browser to download
a "file", which happens to be bytes stored
in a database.
In experimenting with how to do this, I have
this snippet of code in my Action:
   AttachmentListItem attachment =
EmailSQL.getAttachmentListItem(connection, 3, 1);
   response.setContentType(attachment.getContentType());
   byte[] data =
EmailSQL.getAttachmentBytes(connection, 3, 1);
   response.setContentLength(data.length);
   response.setHeader("Content-Disposition",
"attachment; filename=\"" + attachment.getFileName() + 
"\"");
   ServletOutputStream out = response.getOutputStream();
   out.write(data);
   out.flush();
   out.close();

To test this out, I hit the link in my IE browser which brings up
a dialog box allowing me to "Open" or "Save" the file. If I save
the file, it does the right thing. If I press the open button, Acrobat
Reader opens up and then errors out with an alert box:
"There was an error opening the document. The file does not exist."
I have a yahoo email account that I tried a test on. I sent an email
message with the same pdf file attached to that account. I wanted to
see if yahoo figured out how to make this work. They did! (but I can't
figure out how to replicate)
Their header looks like this:
Date: Thu, 03 Jun 2004 15:37:58 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Content-Disposition: attachment; filename=reference.pdf
Connection: close
Transfer-Encoding: chunked
Content-Type: application/pdf; filename="foo.bar"
.s4g--&v=1
There is also some other stuff I am seeing just after the header: 
.s4g-&v=1
which looks something like a query string, but I'm not sure.

My header looks like this:
HTTP/1.1 200 OK
Date: Thu, 03 Jun 2004 15:35:15 GMT
Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a
Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Disposition: attachment; filename="reference.pdf"
Content-Length: 214982
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf;charset=UTF-8
Does anyone know how to work around this problem? I suppose
there are actually 2 parts to this:
1) What is the magic in the HTTP header that allows this to work?
2) How can one create such a header in java?
Thanks.
Dean Hoover


-
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 Web Services Enablement Project : version .02

2004-06-04 Thread Frank Zammetti
I think the ant thing can be done.  I've only used ant once before, and I 
didn't have to write the script, so it's a good opportunity for me to learn 
about it.

I'm looking at the XDoclet site right now.  I think I may have heard of 
XDoclet before, but I don't at this point know anything about it.  Yet 
another opportunity to learn something new! :)

Frank

From: "Marco Mistroni" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Struts Web Services Enablement Project : version .02
Date: Fri, 4 Jun 2004 09:58:22 +0100
Hi,
Just one suggestion, but it's not software related
- provide ant-scripts for compiling data..
- eventually if u could add xdoclet-tags to the action class (2 help
lazy users like me who generates struts-config etc via xdoclet..)
regards
marco
-Original Message-
From: Frank Zammetti [mailto:[EMAIL PROTECTED]
Sent: 03 June 2004 19:51
To: [EMAIL PROTECTED]
Subject: Struts Web Services Enablement Project : version .02
Ok, I just posted version .02 of the newly-named Struts Web Services
Enablement Project (prounced 'SWISS EP' I guess?!?).  Here's the address
again:
http://www.omnytex.com/wst.zip
This version I think is considerably more useful, but I'm still eager to
hear anyone's opinions, comments, suggestions, etc.
Most notably in this version are two changes:
(1) There are no longer ANY required elements to the incoming SOAP
message,
i.e.,  is no longer required.  It still has the flat
format restriction, but it should be cleaner now without even the single
required element.
(2) There is now a Struts plug-in that reads a new
webservices-config.xml
file.  THIS IS OPTIONAL.  You don't have to use the plug-in and you
don't
have to write this config file, but that will limit you to the default
output template dumping all ActionForm members only.  However, I believe
it
will be used more often than not because it allows you to (a) map your
own
XML-rendering JSP's to an Action so that you are no longer limited to
the
default XML template's message format, and (b) allows you to pick and
choose
what ActionForm members are returned by the default template if you
still
want to use it, and even in what order!
There are a number of other more minor changes, but these two I believe
begin to make this project actually worth something (my opinion anyway).
Please, let me know what you think.  Play with the sample webapp, let me
know how I'm doing!
Frank
_
Watch the online reality show Mixed Messages with a friend and enter to
win
a trip to NY
http://www.msnmessenger-download.click-url.com/go/onm00200497ave/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]
_
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: HTTP header for dynamic pdf and IE6

2004-06-04 Thread Henrique VIECILI
Hi Dean,

I did it once, and i did like this:
(solution for PDF file working on IE and any Acrobat Version)
...
response.setContentType("application/octet-stream"); // Acrobat 4 seems "don´t like" 
'application/pdf'
byte[] data = xxx.getData();
response.setContentLength(data.length);
response.setHeader("Content-Disposition","inline; filename=file.pdf");
  /* extension .pdf makes IE choose Acrobat to open the document
   * content 'inline' avoids popping-up the Open/Save Dialog twice in older IE version 
( 5.0 )
   */
out = response.getOutputStream();
out.write(data);
out.flush();
out.close();

Ok, i´m sure it works with Acrobat4+ and IE5+. I did not tested in Linux and other 
browsers.

Henrique Viecili
  - Original Message - 
  From: Dean A. Hoover 
  To: [EMAIL PROTECTED] 
  Sent: Friday, June 04, 2004 9:37 AM
  Subject: HTTP header for dynamic pdf and IE6


  Sorry if this is inappropriate for this list,
  but I really don't know where else to turn. I
  figured someone on this list may have solved it.

  I have a java web application that allows
  an end-user in their browser to download
  a "file", which happens to be bytes stored
  in a database.

  In experimenting with how to do this, I have
  this snippet of code in my Action:

  AttachmentListItem attachment =
   EmailSQL.getAttachmentListItem(connection, 3, 1);
  response.setContentType(attachment.getContentType());
  byte[] data =
   EmailSQL.getAttachmentBytes(connection, 3, 1);
  response.setContentLength(data.length);
  response.setHeader("Content-Disposition",
   "attachment; filename=\"" + attachment.getFileName() + "\"");
  ServletOutputStream out = response.getOutputStream();
  out.write(data);
  out.flush();
  out.close();

  To test this out, I hit the link in my IE browser which brings up
  a dialog box allowing me to "Open" or "Save" the file. If I save
  the file, it does the right thing. If I press the open button, Acrobat
  Reader opens up and then errors out with an alert box:
  "There was an error opening the document. The file does not exist."

  I have a yahoo email account that I tried a test on. I sent an email
  message with the same pdf file attached to that account. I wanted to
  see if yahoo figured out how to make this work. They did! (but I can't
  figure out how to replicate)

  Their header looks like this:
  Date: Thu, 03 Jun 2004 15:37:58 GMT
  P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
  ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
  PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
  Content-Disposition: attachment; filename=reference.pdf
  Connection: close
  Transfer-Encoding: chunked
  Content-Type: application/pdf; filename="foo.bar"

  .s4g--&v=1

  There is also some other stuff I am seeing just after the header: .s4g-&v=1
  which looks something like a query string, but I'm not sure.

  My header looks like this:
  HTTP/1.1 200 OK
  Date: Thu, 03 Jun 2004 15:35:15 GMT
  Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
  mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
  OpenSSL/0.9.7a
  Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
  Pragma: No-cache
  Cache-Control: no-cache
  Expires: Thu, 01 Jan 1970 00:00:00 GMT
  Content-Disposition: attachment; filename="reference.pdf"
  Content-Length: 214982
  Keep-Alive: timeout=15, max=100
  Connection: Keep-Alive
  Content-Type: application/pdf;charset=UTF-8


  Does anyone know how to work around this problem? I suppose
  there are actually 2 parts to this:
  1) What is the magic in the HTTP header that allows this to work?
  2) How can one create such a header in java?

  Thanks.
  Dean Hoover





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


Re: HTTP header for dynamic pdf and IE6

2004-06-04 Thread Mark Lowe
I'm not sure, but i think bill thought the world a better place if 
applications associate file types according to the file suffix.

it will need .pdf at the end of the filename.
filename=\"" + attachment.getFileName() + "\".pdf"
could fix it.
On 4 Jun 2004, at 14:37, Dean A. Hoover wrote:
Sorry if this is inappropriate for this list,
but I really don't know where else to turn. I
figured someone on this list may have solved it.
I have a java web application that allows
an end-user in their browser to download
a "file", which happens to be bytes stored
in a database.
In experimenting with how to do this, I have
this snippet of code in my Action:
   AttachmentListItem attachment =
EmailSQL.getAttachmentListItem(connection, 3, 1);
   response.setContentType(attachment.getContentType());
   byte[] data =
EmailSQL.getAttachmentBytes(connection, 3, 1);
   response.setContentLength(data.length);
   response.setHeader("Content-Disposition",
"attachment; filename=\"" + attachment.getFileName() + 
"\"");
   ServletOutputStream out = response.getOutputStream();
   out.write(data);
   out.flush();
   out.close();

To test this out, I hit the link in my IE browser which brings up
a dialog box allowing me to "Open" or "Save" the file. If I save
the file, it does the right thing. If I press the open button, Acrobat
Reader opens up and then errors out with an alert box:
"There was an error opening the document. The file does not exist."
I have a yahoo email account that I tried a test on. I sent an email
message with the same pdf file attached to that account. I wanted to
see if yahoo figured out how to make this work. They did! (but I can't
figure out how to replicate)
Their header looks like this:
Date: Thu, 03 Jun 2004 15:37:58 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Content-Disposition: attachment; filename=reference.pdf
Connection: close
Transfer-Encoding: chunked
Content-Type: application/pdf; filename="foo.bar"
.s4g--&v=1
There is also some other stuff I am seeing just after the header: 
.s4g-&v=1
which looks something like a query string, but I'm not sure.

My header looks like this:
HTTP/1.1 200 OK
Date: Thu, 03 Jun 2004 15:35:15 GMT
Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a
Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Disposition: attachment; filename="reference.pdf"
Content-Length: 214982
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf;charset=UTF-8
Does anyone know how to work around this problem? I suppose
there are actually 2 parts to this:
1) What is the magic in the HTTP header that allows this to work?
2) How can one create such a header in java?
Thanks.
Dean Hoover


-
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: Security and Struts (JAAS?)

2004-06-04 Thread Bill Siggelkow
Ralf,
Forgive me if I misintrepreted what you are asking, but I believe what 
you are wanting to use the Struts "role" attribute on actions for 
application-managed security.

One way is to put a check on every page as was suggested and is done in 
the Struts example.

Another way is to provide a custom RequestProcessor -- this is easier 
than it sounds ...

The "roles" attribute on  is processed via the 
RequestProcessor.processRoles() method. You will want to override this 
method in a Custom Request Processor -- something like:

public class CustomRequestProcessor extends RequestProcessor {
  protected boolean processRoles(HttpServletRequest request,
	 HttpServletResponse response,
	  	 ActionMapping mapping)
	throws IOException, ServletException {

// Is this action protected by role requirements?
String roles[] = mapping.getRoleNames();
if ((roles == null) || (roles.length < 1)) {
  return (true);
}
// Check the current user against the list of required roles
HttpSession session = request.getSession();
User user = (User) session.getAttribute("user");
if (user == null) {
  return false;
}
for (int i = 0; i < roles.length; i++) {
  if (user.hasRole(roles[i])) {
return (true);
  }
}
response.sendError(HttpServletResponse.SC_BAD_REQUEST,
getInternal().getMessage("notAuthorized",mapping.getPath()));
return (false);
  }
}

Ralf Bode wrote:
Hi, i have a portal based on struts.
and i have some public action.
(e.g for listing news and so on)
however.
my problem is the protected area.
i have two roles.
->customer
->supplier
both login via ONE Action
(i got their roles via their usernames...)
okay, i saved something in session
and did if(session...) in an action,
before a user (a logged in) could
do some stuff.
it works okay, but only
if the user enters a URL like
host:8080/trashApp/cust/addStuff.do
(for submitting a form)
i got validation.errors ...
because the execute() of my action is not called...
so i figured out, that i can use ROLES-attribute
for . nice, but this is jaas, isn't it?
now the (for me) interessting point.
can i add a user (or roles) manually in my 
LogonAction.execute() ?
and when, how?

or how to deal generally?
with two user-roles and ONE-LogonAction.class ?
i also watched tomcat-app, that uses struts/jaas for
authorization, but only with ONE role.
so is there anyone out, how has a tip/solution
for me?
thanks alot!
Ralf

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


RE: Problem with utf-8 encoding with struts

2004-06-04 Thread Piero Colagrosso
Hi folks,

I've been struggling with exactly the same problem described by Ronald in
his initial post and have a few comments/questions regarding some of the
points discussed in this thread.

First of all, I think it's important for us to be very explicit about
whether we are referring to the encoding of the *request* or of the
*response*:

- As I understand it, Ron's original post is a problem relating to the
encoding used by the server when generating a *response*.

- However, the particular servlet filter being referred to in the follow-up
responses has to do with the encoding used to parse the *request* (please
correct me if I'm wrong).

In order to get a better understanding of what methods/settings apply to the
response and which ones apply to the request, I've found the following
summary to be very useful for me:

1. When processing a servlet *request*, the server uses the following order
of precedence, first to last, to determine the request character encoding: 

- Code-specific settings (the *request* methods setCharacterEncoding()) 
- Container specific settings (i.e., vendor specific)
- The default setting (ISO 8859-1)

2. When processing a servlet *response*, the server uses the following order
of precedence, first to last, to determine the response character encoding: 

- Code-specific settings (the *response* methods setContentType() and
setLocale(), or the JSP page directive equivalent mentioned by Ronald) 
- Container specific settings (i.e., vendor specific)
- The default setting (ISO 8859-1)

It's also interesting to note that in the case of Struts, the contentType
setting on the controller (set in struts-config.xml) only modifies the
*default* encoding, which can be overridden by the other settings which have
higher precedence.

In my case, what I've found is that if I want to make sure that my responses
are *always* encoded correctly (i.e., same as Paul's problem), I've had to
use a filter which actually wraps the response and encodes it in UTF-8 (via
an overriding of setContentType method).  The implementation I'm using is
actually described in detail at the following link:

http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n_p.html

BTW, the above link seems to provide the best and most up-to-date
information regarding all the issues that need to be taken into account in
order to provide end-to-end internationalization of a web application.  A
definite must read!!

Using a filter seems to be the best way to guarantee a consistent response
and request encoding, because then you don't have to worry about all the
other places in the applications (JSPs, taglibs, Tiles config, etc...) which
might incorrectly override and 'break' the required encoding.

Cheers,

   Piero 


> -Original Message-
From: John Cavacas 
Subject: RE: Problem with utf-8 encoding with struts 
Date: Mon, 17 May 2004 21:24:50 -0700

This is not just a problem with JSTL, it's a "problem" with JSPs in general.
A JSP page will default to the system encoding, and not what you may specify
on the response somewhere up the chain. 

I'm aware of 3 options. 

1) Use a Servlet filter as suggested. This only works on Servlet 2.3 and
higher containers. 

2) add this to the top of your JSPs maybe in an include:
<%@ page contentType = "text/html; charset=UTF-8" %>

3) Use another view technology like Velocity

And that's half the battle. The other half is making sure that you can
accept input as UTF-8. But that's a story for another day.

john

> -Original Message-
> From: Ronald van den Heuvel [mailto:[EMAIL PROTECTED]
> Sent: May 17, 2004 7:50 AM
> To: Struts Users Mailing List
> Subject: RE: Problem with utf-8 encoding with struts
> 
> Hm ok I will try the filter but this is not the real solution because I
> am not using any other taglibs. Only the standard Struts taglibs.
> 
> 
> 
> -Original Message-
> From: Paul McCulloch [mailto:[EMAIL PROTECTED]
> Sent: maandag 17 mei 2004 13:50
> To: 'Struts Users Mailing List'
> Subject: RE: Problem with utf-8 encoding with struts
> 
> That's an old version I gave the URL for. A better place to look would
> be in
> the Tomcat source.
> 
> Paul
> 
> > -Original Message-
> > From: Paul McCulloch [mailto:[EMAIL PROTECTED]
> > Sent: Monday, May 17, 2004 12:47 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Problem with utf-8 encoding with struts
> >
> >
> > This can happen if you use JSTL tags which overwrite whatever response
> > encoding you set.
> >
> > This can be fixed by using a filter to force the encoding
> >
> > http://www.anassina.com/struts/i18n/SetCharacterEncodingFilter.java
> >
> > Paul
> >
> > > -Original Message-
> > > From: Ronald van den Heuvel
> > [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, May 17, 2004 12:28 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Problem with utf-8 encoding with struts
> > >
> > >
> > >  Hello all,
> > >
> > >
> > >
> > > I am using Struts for a web-application and the web-page
> > should be i

HTTP header for dynamic pdf and IE6

2004-06-04 Thread Dean A. Hoover
Sorry if this is inappropriate for this list,
but I really don't know where else to turn. I
figured someone on this list may have solved it.
I have a java web application that allows
an end-user in their browser to download
a "file", which happens to be bytes stored
in a database.
In experimenting with how to do this, I have
this snippet of code in my Action:
   AttachmentListItem attachment =
EmailSQL.getAttachmentListItem(connection, 3, 1);
   response.setContentType(attachment.getContentType());
   byte[] data =
EmailSQL.getAttachmentBytes(connection, 3, 1);
   response.setContentLength(data.length);
   response.setHeader("Content-Disposition",
"attachment; filename=\"" + attachment.getFileName() + "\"");
   ServletOutputStream out = response.getOutputStream();
   out.write(data);
   out.flush();
   out.close();
To test this out, I hit the link in my IE browser which brings up
a dialog box allowing me to "Open" or "Save" the file. If I save
the file, it does the right thing. If I press the open button, Acrobat
Reader opens up and then errors out with an alert box:
"There was an error opening the document. The file does not exist."
I have a yahoo email account that I tried a test on. I sent an email
message with the same pdf file attached to that account. I wanted to
see if yahoo figured out how to make this work. They did! (but I can't
figure out how to replicate)
Their header looks like this:
Date: Thu, 03 Jun 2004 15:37:58 GMT
P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";, CP="CAO DSP COR CUR
ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi
PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV"
Content-Disposition: attachment; filename=reference.pdf
Connection: close
Transfer-Encoding: chunked
Content-Type: application/pdf; filename="foo.bar"
.s4g--&v=1
There is also some other stuff I am seeing just after the header: .s4g-&v=1
which looks something like a query string, but I'm not sure.
My header looks like this:
HTTP/1.1 200 OK
Date: Thu, 03 Jun 2004 15:35:15 GMT
Server: Apache/2.0.40 (Red Hat Linux) mod_perl/1.99_07-dev Perl/v5.8.0
mod_jk/1.2.5 PHP/4.2.2 mod_python/3.0.1 Python/2.2.2 mod_ssl/2.0.40
OpenSSL/0.9.7a
Set-Cookie: JSESSIONID=DD3D0938B780EEBEBDC1B558CCBAD095; Path=/
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Disposition: attachment; filename="reference.pdf"
Content-Length: 214982
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: application/pdf;charset=UTF-8
Does anyone know how to work around this problem? I suppose
there are actually 2 parts to this:
1) What is the magic in the HTTP header that allows this to work?
2) How can one create such a header in java?
Thanks.
Dean Hoover


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


Re: Hidden Variables

2004-06-04 Thread James Mitchell
The reason I asked that is because I have found that some users seem to
think that they can bookmark pages after submitting a form.  Not sure if
this is what you are seeing, but most of the time, and this is browser
dependent, the saved bookmark will not repost the page, but merely send the
URL, so unless you specify your forms as GET, you may see strange results in
your logs.

Best bet for ruling this out would be to put together some tests.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx


- Original Message -
From: "Joshi, Naveen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 9:47 AM
Subject: RE: Hidden Variables


It was based on log files that we found this error. This has happened for
couple of screens. It will work through out well, pass all the variables
properly and all of a sudden it will not pass one such varaible whereas all
other variables will be passed in the same screen. This is killing me. We
use Internet explorer(5.5 or above) and Netscape(4.7 or above). I have never
seen any user reporting the errors while using Netscape so I'am assuming
that it is a browser error. The difficult part is we are not able to
replicate the same scenario as this occurs once in a blue moon. Moreover
this has happened when there are few or more concurrent users. Wanted to
know if any of you have got the similar error. If there is a possible
solution please let me know.

Thanks


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 7:28 AM
To: Struts Users Mailing List
Subject: Re: Hidden Variables


How do you know it is 1 in 300?  Is that based on tests or on browsing log
files?



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx




- Original Message -
From: "Joshi, Naveen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 02, 2004 8:10 AM
Subject: RE: Hidden Variables


I use Post method.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Lionel
Sent: Wednesday, June 02, 2004 5:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Hidden Variables


Joshi, Naveen wrote:
> All,
>
> one out of 300 times my hidden variable would not set to form. Any
> ideas what could be the issue.

do you use get or post method to send your form ?




-
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: Strus Web Service Enablement

2004-06-04 Thread salgado.pc

  For what I understood you are customizing the RequestProcessor to handle
SOAP message requests, right? I dont see Axis and any way of retrieving
the WSDL to make a direct call...

  If so, maybe instead of customizing the request processor, wouldn't it
be best to have a "SOAPform" to process the envelope and then populate
the bean? You could define the form-bean as your SOAPForm handler and a
regular action-mapping.
  With the help of Tiles one could define a template definition to return
the response in the appropriate format.

  Template:
  - soap header
  - soap body
  - soap footer

  How could one use your RequestProcessor if I am using Axis and
publishing web services through WSDD or JWS files?
  I am new to web services but I found very usefull wsdl2java and have my
clients process their requests in a somewhat transparent way through the
use of SoapBindingStubs.
  It seems that with your approach I can't call a web service with these
stubs but, instead, need to implement some
SOAPMessageBuilder+Marshalling/Unmarshalling of JavaBeans to send SOAP
messages, something that with JWS files, for example, is completely
transparent.


Pedro Salgado


> Ah, I see.  I'm not familiar enough with filters, but I had always
> thought  they were on the input side only.  If that belief is wrong,
> then it  certainly becomes an option.
>
> I think at some point to make this really worth anything I'll have to
> break  my "transparency rule" to some extent.  I do like the idea of
> generating the  output with a JSP because it's just so easy!  A little
> bit of background...  I actually implemented this same thing in a custom
> framework we were  previously using in-house.  In that application I
> actually do write out the  output in servlets, there is never a forward
> to a JSP or anything else  typically in the "view" layer.
>  This works
> just fine, but when I started  doing it in Struts it ocurred to me that
> I could really simplify things by  not taking that approach and instead
> let the actual XML generation be done  in a JSP.  That also removed the
> one change that was required under the old  framework: you did have to
> add two function calls to the controller servlets  that were exposed as
> services.  Not a big change, but I wanted to avoid code  changes
> entirely here.
>
> At this point my belief is that probably the best way to handle this is
> to  have an element added to the Action mappings in Struts-Config.xml
> that  specifies the target JSP for a Web Service request.  The default
> woudl be  the "generic" template I put together, although a bit more
> flexible as time  goes on.  But, the point is that you could then define
> an XML template in  essence for every Action you wanted to expose as a
> service.  That would  allow for things I probably can't do
> automatically.  I'd also write a taglib  to make life easier (although I
> might not have to... the current Struts  taglibs might be more than
> sufficient on their own).
>
> That would of course require a change to the DTD for Struts-Config.xml,
> so  in the mean time what I think I'm going to do is add an optional
> config file  thatwould be parsed via a plug-in at app startup that would
> contain these  extra mappings.  Fairly trivial exercise, and it leaves
> it completely  optional, no changes to Struts required.
>
> Also, I realized on the drive in that there's no need to put the
> parameters  as a query string as I'm doing... I can just put the parsed
> parameters  directly into the request object as an attribute.  Since
> only the second  pass of a Web Service request would know or care about
> that object, it will  basically just remove some code and simplify
> things a bit.
>
> I'm hoping to get these thnigs done today and release a .02 package
> before I  leave work today (it's nice when your development server is
> down and you  can't do any real work until the techs rebuild it!)... I
> also hope to remove  the required actionMappingPath element in the XML
> request... I haven't found  a way to get at the requested pat
> information in RequestProcessor yet, but  it seems like something that
> should be available at that point, so I  probably just have to do some
> digging.
>
> What is AOP by the way?  Millions of acronyms out there, I know
> thousands of  them, but not that one :)
>
> Thanks very much for the feedback!
>
> Frank
>
>>From: "Marco Mistroni" <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>>Subject: RE: Strus Web Service Enablement
>>Date: Thu, 3 Jun 2004 14:25:47 +0100
>>
>>Hi,
>>  Well, main issue here is that if you want everything to be
>>transparent
>>To the user (including the forward) then whole stuff has to be done so
>> that
>>Something 'intercepts' the response when XML is contained in it (if I
>> can explain myself correctly)
>>
>>In other way, to do same steps that you have already done with
>>RequestProcessor
>>No

RE: Hidden Variables

2004-06-04 Thread Andrew Hill
Hmm. I guess that rules out the chance of it being caused by multiple
requests overwriting each others properties in the action form.

-Original Message-
From: Joshi, Naveen [mailto:[EMAIL PROTECTED]
Sent: Friday, 4 June 2004 19:47
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Hidden Variables


Request Scope Form.

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 2:48 AM
To: Struts Users Mailing List
Subject: RE: Hidden Variables


Is is a session or request scoped form?

-Original Message-
From: Joshi, Naveen [mailto:[EMAIL PROTECTED]
Sent: Thursday, 3 June 2004 21:48
To: Struts Users Mailing List
Subject: RE: Hidden Variables


It was based on log files that we found this error. This has happened for
couple of screens. It will work through out well, pass all the variables
properly and all of a sudden it will not pass one such varaible whereas all
other variables will be passed in the same screen. This is killing me. We
use Internet explorer(5.5 or above) and Netscape(4.7 or above). I have never
seen any user reporting the errors while using Netscape so I'am assuming
that it is a browser error. The difficult part is we are not able to
replicate the same scenario as this occurs once in a blue moon. Moreover
this has happened when there are few or more concurrent users. Wanted to
know if any of you have got the similar error. If there is a possible
solution please let me know.

Thanks


-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 7:28 AM
To: Struts Users Mailing List
Subject: Re: Hidden Variables


How do you know it is 1 in 300?  Is that based on tests or on browsing log
files?



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx




- Original Message -
From: "Joshi, Naveen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 02, 2004 8:10 AM
Subject: RE: Hidden Variables


I use Post method.

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Lionel
Sent: Wednesday, June 02, 2004 5:24 AM
To: [EMAIL PROTECTED]
Subject: Re: Hidden Variables


Joshi, Naveen wrote:
> All,
>
> one out of 300 times my hidden variable would not set to form. Any
> ideas what could be the issue.

do you use get or post method to send your form ?




-
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: Saving state.

2004-06-04 Thread Martin Gainty
Segui
I would recommend using a Stateful Session Bean
Novell provides a good tutorial on how to create and deploy Stateful Session
Bean at
http://www.novell.com/documentation/extendas/sshelp/Docs/help/books/gsSBQuickStart.html
Entiendes?
-Martin
- Original Message - 
From: "SEGUI MUNAR" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 2:43 AM
Subject: Saving state.


> Hi. I'm developing an application with Struts 1.1, Tomcat 5 and Eclipse. I
> explain my problem:
>
> This situation is: I have 1 jsp (jsp1) that shows information in a grid.
> From this grid I can go to the jsp2, where I can see the details of 1 row
of
> the previous grid. From jsp2 I can go to jsp3, where I can see aditional
> information about the record shown in jsp2. From jsp3 I can go to jsp4 to
> see any other information, and so on. My problem is not going forward, my
> problem is goin back. ¿How can I retrieve the state of each action form? I
> use scope="request". ¿Should I implement an stack to save the differents
> actionform's? Is there any example of stack. ¿Should I implement any other
> system?
>
> I would appreciate your help.
>
> Thanks in advance.
>
> _
> ¿Dónde se esconden [EMAIL PROTECTED] [EMAIL PROTECTED] Encuentra miles de perfiles 
> en MSN Amor &
> Amistad. http://match.msn.es/
>
>
> -
> 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: Saving state.

2004-06-04 Thread Miquel Angel
I'm goin to explain the situation with more details:

I have a grid in JSP1. This grid shows information related to customers.
This JSP1 also have 3 textfields which allow the user to filter the
customers to be shown in the grid (name, address and phone number). This
textfields are defined in the ActionForm.
From JSP1, selecting 1 customer and clicking the button Details, he can go
to a 2nd jsp, JSP2. This JSP2 shows the details of a customer (all the filds
we have in DB. Of course this fields are definied in the ActionForm).
From JSP2, clicking the button Orders, the application goes to the JSP3.
This JSP3 shows all the orders related to the customer of JSP2.
From JSP3, selecting 1 order and clicking the button Details, the
application goes to the JSP4. This JSP shows the details of the order.

Being in JSP4, the user can click the button Cancel, and the application
goes back to JSP3. At that moment I need to know the Id of the Order(*).
Being in JSP3, the user can click again the button Cancel, and the
application goes back to JPS2. At that moment I need to know de Id of the
customer(*).
And finally, being in JSP2, , the user can click again the button Cancel,
and the application goes back to JSP1. And here I need to know what
information entered the user to filter all the customers(*).

(*) At this moments, I need to retrieve information that the user entered
sometime in the past. My question is ¿how show I store that information?
¿Shoul I implement an stack? ¿Is there any standard method to do this? Our
initial idea was to save the actionforms in the session, and retrive them
when we need them.

Thanks in advance.

Atentamente, Miquel Angel Seguí Munar
Tel. 647 51 43 41
Sidiem S.L.

-Mensaje original-
De: Kunal H. Parikh [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 04 de junio de 2004 10:31
Para: 'Struts Users Mailing List'
Asunto: RE: Saving state.


Hi!

What state are you trying to remember?

If it is the preparation of the grid in JSP1, then u can either save the
attributes as session attributes or the results as a session attribute.

Also, if everything is related to an ID, then u can reconstruct links with
the id in all links on the page.

You need to be a little more specific to get a more specific answer to your
scenario.

HTH anyway!


Kunal

-Original Message-
From: SEGUI MUNAR [mailto:[EMAIL PROTECTED]
Sent: Thursday, 3 June 2004 16:43
To: [EMAIL PROTECTED]
Subject: Saving state.

Hi. I'm developing an application with Struts 1.1, Tomcat 5 and
Eclipse. I
explain my problem:

This situation is: I have 1 jsp (jsp1) that shows information in a
grid.
>From this grid I can go to the jsp2, where I can see the details of 1 row
of
the previous grid. From jsp2 I can go to jsp3, where I can see aditional
information about the record shown in jsp2. From jsp3 I can go to jsp4 to
see any other information, and so on. My problem is not going forward, my
problem is goin back. ¿How can I retrieve the state of each action form? I
use scope="request". ¿Should I implement an stack to save the differents
actionform's? Is there any example of stack. ¿Should I implement any other
system?

I would appreciate your help.

Thanks in advance.

_
¿Dónde se esconden [EMAIL PROTECTED] [EMAIL PROTECTED] Encuentra miles de perfiles en 
MSN Amor &
Amistad. http://match.msn.es/


-
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: Security and Struts (JAAS?)

2004-06-04 Thread Václavík Radek
Why don't you use a tag to check the logon on every page you want a secured
access to? Just like in the struts-example:

at the top of your JSP goes: 
<%@ taglib uri="/WEB-INF/app.tld" prefix="app" %>


and the class that is behind this has to extend TagSupport. See the
struts-example for more details.

Radek

> -Original Message-
> From: Ralf Bode [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 04, 2004 11:26 AM
> To: [EMAIL PROTECTED]
> Subject: Security and Struts (JAAS?)
> 
> 
> Hi, i have a portal based on struts.
> and i have some public action.
> (e.g for listing news and so on)
> however.
> my problem is the protected area.
> i have two roles.
> ->customer
> ->supplier
> 
> both login via ONE Action
> (i got their roles via their usernames...)
> okay, i saved something in session
> and did if(session...) in an action,
> before a user (a logged in) could
> do some stuff.
> 
> it works okay, but only
> if the user enters a URL like
> host:8080/trashApp/cust/addStuff.do
> (for submitting a form)
> i got validation.errors ...
> because the execute() of my action is not called...
> 
> so i figured out, that i can use ROLES-attribute
> for . nice, but this is jaas, isn't it?
> 
> now the (for me) interessting point.
> can i add a user (or roles) manually in my 
> LogonAction.execute() ?
> and when, how?
> 
> or how to deal generally?
> with two user-roles and ONE-LogonAction.class ?
> 
> i also watched tomcat-app, that uses struts/jaas for
> authorization, but only with ONE role.
> 
> so is there anyone out, how has a tip/solution
> for me?
> 
> thanks alot!
> 
> Ralf
> 
> 
>   
> 
>   
>   
> Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: How appropriately access message-resources from Form classes??

2004-06-04 Thread Cosyns Xavier
It's for field validation purposes,

Eg: 
Error.mandatory=Attribute {0} is mandatory.
Key.field.one=name
Key.field.two=description
Etc...

The validator framework does it, but I got forms that needs quite more
complicated and conditionally validations that I can not do with the
validator framework.



>
>Call me nosy here, What sort of values would you want 
>internationalized this way?
>
>I would think that the parameters should be just that -- 
>parameters. Essentially you "should" be trying to fill in the 
>blank in some string. At least that's what the framework envisions...
>
>Ex:
>
>My name is {0}
>
>Or
>
>Me llamo es {0}
>
>Does it matter to your app if {0} is Joe or Jose'? Is it not 
>something you can handle in the message text itself?
>
>Kind of curious now...
>
>-Joe
>
>> -Original Message-
>> From: Cosyns Xavier [mailto:[EMAIL PROTECTED]
>> Sent: Friday, June 04, 2004 5:23 AM
>> To: Struts Users Mailing List
>> Subject: How appropriately access message-resources from Form 
>> classes??
>> 
>> 
>> Hi,
>> 
>> I want to do some custom validation inside my ValidatorForm
>> but encountered some problems in displaying in a 
>> 'struts-recommended way' my error messages.
>> 
>> From inside a ValidatorForm I can not find a way to access
>> the resource bundles configured in the struts config file. I 
>> need it because I want to create an actionError with 
>> internationalized arguments.
>> 
>> Something like this:
>> ActionError("my.error.key", getResourceValue("my.first.arg.key"),
>> getResourceValue("my.second.arg.key"));
>> 
>> But I do not know how to access my properties in a 'struts'
>> way inside my ValidatorForm.
>> 
>> With Action there are no problems as we have a getResources() method.
>> 
>> Does anyone have some idea about this,
>> 
>> Thanks,
>> 
>> Cosyns Xavier,
>> __ 
>> [EMAIL PROTECTED] 
>>  
>> InveO Consulting & Development
>> Av. E. de Beco 112
>> 1050 Ixelles
>> Tel: +32 2 648 74 32 
>> Fax: +32 2 648 87 64 
>> 
>> 
>> 
>> 
>> -
>> 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: How appropriately access message-resources from Form classes??

2004-06-04 Thread Joe Hertz

Call me nosy here, What sort of values would you want internationalized
this way?

I would think that the parameters should be just that -- parameters.
Essentially you "should" be trying to fill in the blank in some string.
At least that's what the framework envisions...

Ex:

My name is {0}

Or

Me llamo es {0}

Does it matter to your app if {0} is Joe or Jose'? Is it not something
you can handle in the message text itself?

Kind of curious now...

-Joe

> -Original Message-
> From: Cosyns Xavier [mailto:[EMAIL PROTECTED] 
> Sent: Friday, June 04, 2004 5:23 AM
> To: Struts Users Mailing List
> Subject: How appropriately access message-resources from Form 
> classes??
> 
> 
> Hi,
> 
> I want to do some custom validation inside my ValidatorForm 
> but encountered some problems in displaying in a 
> 'struts-recommended way' my error messages.
> 
> From inside a ValidatorForm I can not find a way to access 
> the resource bundles configured in the struts config file. I 
> need it because I want to create an actionError with 
> internationalized arguments.
> 
> Something like this:
> ActionError("my.error.key", getResourceValue("my.first.arg.key"),
> getResourceValue("my.second.arg.key"));
> 
> But I do not know how to access my properties in a 'struts' 
> way inside my ValidatorForm.
> 
> With Action there are no problems as we have a getResources() method.
> 
> Does anyone have some idea about this,
> 
> Thanks,
> 
> Cosyns Xavier, 
> __ 
> [EMAIL PROTECTED] 
>  
> InveO Consulting & Development
> Av. E. de Beco 112
> 1050 Ixelles 
> Tel: +32 2 648 74 32 
> Fax: +32 2 648 87 64 
> 
> 
> 
> 
> -
> 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: URL regd Servlet filter

2004-06-04 Thread Jose Ramon Diaz
> can you give an outline of the typeof problem you faced?

 I started one discussion last week, but it?hasn?t been answered :)
It said...

I am trying to wrap the HttpServletResponse to apply gzip compression on
data sent to the client when gzip is supported. I'm using a filter,wrapper
and custom ServletOutputStream based on published code.
It seems to work except when I chain actions. If I call one action which
executes a forward to a JSP, I get the exception attached.

We have the filter applied only to *.do in  from web.xml, so we
thought the filter is applied to the actions, and the JSP.

We know this question has been asked several times, but we have not found a
good solution for us. what could I be doing that would cause the stream to
be closed? Can?t we put a filter to compress if we use forwards from
actions?

Thanks in advance!



-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 04 de junio de 2004 10:50
Para: Struts Users Mailing List
Asunto: RE: URL regd Servlet filter



I am using filters and have some pages that forwards to a JSP(though I
should try avoiding that) I have not faced any problem yet. can you give an
outline of the typeof problem you faced?

"Jose Ramon Diaz" <[EMAIL PROTECTED]>
06/04/2004 02:05 PM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>

To"'Struts Users Mailing List'" <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]>
cc
SubjectRE: URL regd Servlet filter







Don?t you have problem with filters if the actions forward to JSP?
At least, I have a lot of problem with compression filters, as the container
seems to use another request for the JSP.

regards

> -Mensaje original-
> De: Prashanth.S [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 04 de junio de 2004 10:13
> Para: Struts Users Mailing List; [EMAIL PROTECTED]
> Asunto: Re: URL regd Servlet filter
>
>
> Hi,
> I think u should override actionservelet class in struts and
> configure struts-config.xml...not so sure..left struts
> coding long back...take a look at below links...
> might help u...
> http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
> http://www.junlu.com/msg/30175.html
>
> Thanks
> Prashanth
>
>
>
>
> Shilpa Vaidya <[EMAIL PROTECTED]> wrote:
>
> hey amit,
> the url is -
> http://prdownloads.sourceforge.net/securityfilter/securityfilt
> er-1.0.1.z
> We really need sound help. I have less time.Also in the book struts in
> action they mention filtering.
> How wud i start making my own servlet filter.expersts pls advice.
> Regd.
> shilpa
>
>
> ip?download
> -Original Message-
> From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 6:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Servlet filter
>
>
> Thanks brati,
> r u writing a servlet filter .
> how did u approach it.
> can u show me a starting point.
> shilpa
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 5:59 PM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: Re: Servlet filter
>
>
>
> Shilpa,
> We are doing just that. A filter comes into effect before the
> control goes
> to the servlet. So if you can stop the user at the filter
> level you are
> actually saving some processing. We are checking for the
> presence of session
> in the filter.
>
> Brati Sankar Ghosh
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
>
>
> "Shilpa Vaidya"
> 06/03/2004 03:41 PM
> Please respond to
> "Struts Users Mailing List"
>
>
> To "'Struts Users Mailing List'"
> cc
> Subject Servlet filter
>
>
>
>
>
>
>
> hey all,
> Preventing users from accesing action. I am writing a web app
> to manage
> administrators and profiles.
> Administrators may access to the web app based on the
> profiles they have.
> The profiles, determine which pages the administrator might
> access. The
> profiles, and authorizations, might change online during
> work, so I need
> to
> check authorization to access a page (Action) on each access.If I
> understand
> correct, then, the actionServlet, first process the form
> bean, and then
> the
> action..
> But, if the user is not authorized to access a specific page
> (Action), I
> need to forward him to an UnAuthorized error page, before thr
> formAction
> bean is filled.
> I would like to use a servlet filter. This filter checks the
> users rights
> and instanciates a HttpServletRequest-Wrapper.But am not sure
> how - .Can
> anyone help.Till then me trying to study the ServletFilter
> examples here n
> there.
> Shilpa
>
>
>
>
>
> --
>
>
> "This e-mail message may contain confidential, proprietary or legally
> privileged information. It
> should not be used by anyone who is not the original intended
> recipient.
> If you have erroneously
> received this message, please delete it immediately and
> notify the sender.
> The recipient
> acknowledges that ICICI Bank or its subsidiaries and
> ass

RE: Saving state.

2004-06-04 Thread Kunal H. Parikh
Hi!

What state are you trying to remember?

If it is the preparation of the grid in JSP1, then u can either save the
attributes as session attributes or the results as a session attribute.

Also, if everything is related to an ID, then u can reconstruct links with
the id in all links on the page.

You need to be a little more specific to get a more specific answer to your
scenario.

HTH anyway!


Kunal

-Original Message-
From: SEGUI MUNAR [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 3 June 2004 16:43
To: [EMAIL PROTECTED]
Subject: Saving state.

Hi. I'm developing an application with Struts 1.1, Tomcat 5 and
Eclipse. I 
explain my problem:

This situation is: I have 1 jsp (jsp1) that shows information in a
grid. 
>From this grid I can go to the jsp2, where I can see the details of 1 row
of 
the previous grid. From jsp2 I can go to jsp3, where I can see aditional 
information about the record shown in jsp2. From jsp3 I can go to jsp4 to 
see any other information, and so on. My problem is not going forward, my 
problem is goin back. ¿How can I retrieve the state of each action form? I 
use scope="request". ¿Should I implement an stack to save the differents 
actionform's? Is there any example of stack. ¿Should I implement any other 
system?

I would appreciate your help.

Thanks in advance.

_
¿Dónde se esconden [EMAIL PROTECTED] [EMAIL PROTECTED] Encuentra miles de perfiles en 
MSN Amor & 
Amistad. http://match.msn.es/


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



Security and Struts (JAAS?)

2004-06-04 Thread Ralf Bode
Hi, i have a portal based on struts.
and i have some public action.
(e.g for listing news and so on)
however.
my problem is the protected area.
i have two roles.
->customer
->supplier

both login via ONE Action
(i got their roles via their usernames...)
okay, i saved something in session
and did if(session...) in an action,
before a user (a logged in) could
do some stuff.

it works okay, but only
if the user enters a URL like
host:8080/trashApp/cust/addStuff.do
(for submitting a form)
i got validation.errors ...
because the execute() of my action is not called...

so i figured out, that i can use ROLES-attribute
for . nice, but this is jaas, isn't it?

now the (for me) interessting point.
can i add a user (or roles) manually in my 
LogonAction.execute() ?
and when, how?

or how to deal generally?
with two user-roles and ONE-LogonAction.class ?

i also watched tomcat-app, that uses struts/jaas for
authorization, but only with ONE role.

so is there anyone out, how has a tip/solution
for me?

thanks alot!

Ralf






Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

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



How appropriately access message-resources from Form classes??

2004-06-04 Thread Cosyns Xavier
Hi,

I want to do some custom validation inside my ValidatorForm but
encountered some problems in displaying in a 'struts-recommended way' my
error messages.

>From inside a ValidatorForm I can not find a way to access the resource
bundles configured in the struts config file. I need it because I want
to create an actionError with internationalized arguments.

Something like this:
ActionError("my.error.key", getResourceValue("my.first.arg.key"),
getResourceValue("my.second.arg.key"));

But I do not know how to access my properties in a 'struts' way inside
my ValidatorForm.

With Action there are no problems as we have a getResources() method.

Does anyone have some idea about this,

Thanks,

Cosyns Xavier, 
__ 
[EMAIL PROTECTED] 
 
InveO Consulting & Development
Av. E. de Beco 112
1050 Ixelles 
Tel: +32 2 648 74 32 
Fax: +32 2 648 87 64 




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



RE: Struts Web Services Enablement Project : version .02

2004-06-04 Thread Marco Mistroni
Hi,
Just one suggestion, but it's not software related 
- provide ant-scripts for compiling data..
- eventually if u could add xdoclet-tags to the action class (2 help
lazy users like me who generates struts-config etc via xdoclet..)

regards
marco

-Original Message-
From: Frank Zammetti [mailto:[EMAIL PROTECTED] 
Sent: 03 June 2004 19:51
To: [EMAIL PROTECTED]
Subject: Struts Web Services Enablement Project : version .02

Ok, I just posted version .02 of the newly-named Struts Web Services 
Enablement Project (prounced 'SWISS EP' I guess?!?).  Here's the address

again:

http://www.omnytex.com/wst.zip

This version I think is considerably more useful, but I'm still eager to

hear anyone's opinions, comments, suggestions, etc.

Most notably in this version are two changes:

(1) There are no longer ANY required elements to the incoming SOAP
message, 
i.e.,  is no longer required.  It still has the flat 
format restriction, but it should be cleaner now without even the single

required element.

(2) There is now a Struts plug-in that reads a new
webservices-config.xml 
file.  THIS IS OPTIONAL.  You don't have to use the plug-in and you
don't 
have to write this config file, but that will limit you to the default 
output template dumping all ActionForm members only.  However, I believe
it 
will be used more often than not because it allows you to (a) map your
own 
XML-rendering JSP's to an Action so that you are no longer limited to
the 
default XML template's message format, and (b) allows you to pick and
choose 
what ActionForm members are returned by the default template if you
still 
want to use it, and even in what order!

There are a number of other more minor changes, but these two I believe 
begin to make this project actually worth something (my opinion anyway).

Please, let me know what you think.  Play with the sample webapp, let me

know how I'm doing!

Frank

_
Watch the online reality show Mixed Messages with a friend and enter to
win 
a trip to NY 
http://www.msnmessenger-download.click-url.com/go/onm00200497ave/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: URL regd Servlet filter

2004-06-04 Thread brati . sankarghosh

I am using filters and have some pages
that forwards to a JSP(though I should try avoiding that) I have not faced
any problem yet. can you give an outline of the typeof problem you faced?

Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





"Jose Ramon Diaz"
<[EMAIL PROTECTED]> 
06/04/2004 02:05 PM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"'Struts Users Mailing
List'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>


cc



Subject
RE: URL regd Servlet filter








Don?t you have problem with filters if the actions
forward to JSP?
At least, I have a lot of problem with compression filters, as the container
seems to use another request for the JSP.

regards

> -Mensaje original-
> De: Prashanth.S [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 04 de junio de 2004 10:13
> Para: Struts Users Mailing List; [EMAIL PROTECTED]
> Asunto: Re: URL regd Servlet filter
>
>
> Hi,
> I think u should override actionservelet class in struts and
> configure struts-config.xml...not so sure..left struts
> coding long back...take a look at below links...
> might help u...
> http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
> http://www.junlu.com/msg/30175.html
>
> Thanks
> Prashanth
>
>
>
>
> Shilpa Vaidya <[EMAIL PROTECTED]> wrote:
>
> hey amit,
> the url is -
> http://prdownloads.sourceforge.net/securityfilter/securityfilt
> er-1.0.1.z
> We really need sound help. I have less time.Also in the book struts
in
> action they mention filtering.
> How wud i start making my own servlet filter.expersts pls advice.
> Regd.
> shilpa
>
>
> ip?download
> -Original Message-
> From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 6:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Servlet filter
>
>
> Thanks brati,
> r u writing a servlet filter .
> how did u approach it.
> can u show me a starting point.
> shilpa
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 5:59 PM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: Re: Servlet filter
>
>
>
> Shilpa,
> We are doing just that. A filter comes into effect before the
> control goes
> to the servlet. So if you can stop the user at the filter
> level you are
> actually saving some processing. We are checking for the
> presence of session
> in the filter.
>
> Brati Sankar Ghosh
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
>
>
> "Shilpa Vaidya"
> 06/03/2004 03:41 PM
> Please respond to
> "Struts Users Mailing List"
>
>
> To "'Struts Users Mailing List'"
> cc
> Subject Servlet filter
>
>
>
>
>
>
>
> hey all,
> Preventing users from accesing action. I am writing a web app
> to manage
> administrators and profiles.
> Administrators may access to the web app based on the
> profiles they have.
> The profiles, determine which pages the administrator might
> access. The
> profiles, and authorizations, might change online during
> work, so I need
> to
> check authorization to access a page (Action) on each access.If I
> understand
> correct, then, the actionServlet, first process the form
> bean, and then
> the
> action..
> But, if the user is not authorized to access a specific page
> (Action), I
> need to forward him to an UnAuthorized error page, before thr
> formAction
> bean is filled.
> I would like to use a servlet filter. This filter checks the
> users rights
> and instanciates a HttpServletRequest-Wrapper.But am not sure
> how - .Can
> anyone help.Till then me trying to study the ServletFilter
> examples here n
> there.
> Shilpa
>
>
>
>
>
> --
>
>
> "This e-mail message may contain confidential, proprietary or
legally
> privileged information. It
> should not be used by anyone who is not the original intended
> recipient.
> If you have erroneously
> received this message, please delete it immediately and
> notify the sender.
> The recipient
> acknowledges that ICICI Bank or its subsidiaries and
> associated companies,
> (collectively "ICICI
> Group"), are unable to exercise control or ensure or guarantee
the
> integrity of/over the contents of the information contained in e-mail
> transmissions and further acknowledges that any views
> expressed in this message are those of the individual sender and no
> binding nature of the message shall be implied or assumed
> unless the sender
> does so expressly with due authority of ICICI Group.Before opening
any
> attachments please check them for viruses and defects."
>
>
>
> ForwardSourceID:NTA91E
> --
>
>
> "This e-mail message may contain confidential, proprietary or
legally
> privileged information. It
> should not be used by anyone who is not the original intended
> recipient. If
> you have erroneously
> received this message, please delete it immediately and
> notify the sender.
> The recipient
> acknowledges that ICICI Bank or its subsidiaries and
> associated c

RE: URL regd Servlet filter

2004-06-04 Thread Jose Ramon Diaz
Don?t you have problem with filters if the actions forward to JSP?
At least, I have a lot of problem with compression filters, as the container
seems to use another request for the JSP.

regards

> -Mensaje original-
> De: Prashanth.S [mailto:[EMAIL PROTECTED]
> Enviado el: viernes, 04 de junio de 2004 10:13
> Para: Struts Users Mailing List; [EMAIL PROTECTED]
> Asunto: Re: URL regd Servlet filter
>
>
> Hi,
> I think u should override actionservelet class in struts and
> configure struts-config.xml...not so sure..left struts
> coding long back...take a look at below links...
> might help u...
> http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
> http://www.junlu.com/msg/30175.html
>
> Thanks
> Prashanth
>
>
>
>
> Shilpa Vaidya <[EMAIL PROTECTED]> wrote:
>
> hey amit,
> the url is -
> http://prdownloads.sourceforge.net/securityfilter/securityfilt
> er-1.0.1.z
> We really need sound help. I have less time.Also in the book struts in
> action they mention filtering.
> How wud i start making my own servlet filter.expersts pls advice.
> Regd.
> shilpa
>
>
> ip?download
> -Original Message-
> From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 6:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Servlet filter
>
>
> Thanks brati,
> r u writing a servlet filter .
> how did u approach it.
> can u show me a starting point.
> shilpa
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 03, 2004 5:59 PM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: Re: Servlet filter
>
>
>
> Shilpa,
> We are doing just that. A filter comes into effect before the
> control goes
> to the servlet. So if you can stop the user at the filter
> level you are
> actually saving some processing. We are checking for the
> presence of session
> in the filter.
>
> Brati Sankar Ghosh
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
>
>
> "Shilpa Vaidya"
> 06/03/2004 03:41 PM
> Please respond to
> "Struts Users Mailing List"
>
>
> To "'Struts Users Mailing List'"
> cc
> Subject Servlet filter
>
>
>
>
>
>
>
> hey all,
> Preventing users from accesing action. I am writing a web app
> to manage
> administrators and profiles.
> Administrators may access to the web app based on the
> profiles they have.
> The profiles, determine which pages the administrator might
> access. The
> profiles, and authorizations, might change online during
> work, so I need
> to
> check authorization to access a page (Action) on each access.If I
> understand
> correct, then, the actionServlet, first process the form
> bean, and then
> the
> action..
> But, if the user is not authorized to access a specific page
> (Action), I
> need to forward him to an UnAuthorized error page, before thr
> formAction
> bean is filled.
> I would like to use a servlet filter. This filter checks the
> users rights
> and instanciates a HttpServletRequest-Wrapper.But am not sure
> how - .Can
> anyone help.Till then me trying to study the ServletFilter
> examples here n
> there.
> Shilpa
>
>
>
>
>
> --
>
>
> "This e-mail message may contain confidential, proprietary or legally
> privileged information. It
> should not be used by anyone who is not the original intended
> recipient.
> If you have erroneously
> received this message, please delete it immediately and
> notify the sender.
> The recipient
> acknowledges that ICICI Bank or its subsidiaries and
> associated companies,
> (collectively "ICICI
> Group"), are unable to exercise control or ensure or guarantee the
> integrity of/over the contents of the information contained in e-mail
> transmissions and further acknowledges that any views
> expressed in this message are those of the individual sender and no
> binding nature of the message shall be implied or assumed
> unless the sender
> does so expressly with due authority of ICICI Group.Before opening any
> attachments please check them for viruses and defects."
>
>
>
> ForwardSourceID:NTA91E
> --
>
>
> "This e-mail message may contain confidential, proprietary or legally
> privileged information. It
> should not be used by anyone who is not the original intended
> recipient. If
> you have erroneously
> received this message, please delete it immediately and
> notify the sender.
> The recipient
> acknowledges that ICICI Bank or its subsidiaries and
> associated companies,
> (collectively "ICICI
> Group"), are unable to exercise control or ensure or
> guarantee the integrity
> of/over the contents of the information contained in e-mail
> transmissions
> and further acknowledges that any views
> expressed in this message are those of the individual sender
> and no binding
> nature of the message shall be implied or assumed unless the
> sender does so
> expressly with due authority of ICICI Group.Before opening
> any attachments
> please check them for viruses and defects."
>
>
>
> --
>
>
> "This e-mail messa

Re: URL regd Servlet filter

2004-06-04 Thread Prashanth.S
Hi,
I think u should override actionservelet class in struts and configure 
struts-config.xml...not so sure..left struts coding long back...take a look at 
below links...
might help u...
http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
http://www.junlu.com/msg/30175.html
 
Thanks
Prashanth
 
 


Shilpa Vaidya <[EMAIL PROTECTED]> wrote:

hey amit,
the url is -
http://prdownloads.sourceforge.net/securityfilter/securityfilter-1.0.1.z
We really need sound help. I have less time.Also in the book struts in
action they mention filtering.
How wud i start making my own servlet filter.expersts pls advice.
Regd.
shilpa


ip?download
-Original Message-
From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 6:07 PM
To: 'Struts Users Mailing List'
Subject: RE: Servlet filter


Thanks brati,
r u writing a servlet filter .
how did u approach it.
can u show me a starting point.
shilpa
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 5:59 PM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: Re: Servlet filter



Shilpa,
We are doing just that. A filter comes into effect before the control goes
to the servlet. So if you can stop the user at the filter level you are
actually saving some processing. We are checking for the presence of session
in the filter.

Brati Sankar Ghosh
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


"Shilpa Vaidya" 
06/03/2004 03:41 PM
Please respond to
"Struts Users Mailing List" 


To "'Struts Users Mailing List'" 
cc
Subject Servlet filter







hey all,
Preventing users from accesing action. I am writing a web app to manage
administrators and profiles.
Administrators may access to the web app based on the profiles they have.
The profiles, determine which pages the administrator might access. The
profiles, and authorizations, might change online during work, so I need
to
check authorization to access a page (Action) on each access.If I
understand
correct, then, the actionServlet, first process the form bean, and then
the
action..
But, if the user is not authorized to access a specific page (Action), I
need to forward him to an UnAuthorized error page, before thr formAction
bean is filled.
I would like to use a servlet filter. This filter checks the users rights
and instanciates a HttpServletRequest-Wrapper.But am not sure how - .Can
anyone help.Till then me trying to study the ServletFilter examples here n
there.
Shilpa





--


"This e-mail message may contain confidential, proprietary or legally
privileged information. It
should not be used by anyone who is not the original intended recipient.
If you have erroneously
received this message, please delete it immediately and notify the sender.
The recipient
acknowledges that ICICI Bank or its subsidiaries and associated companies,
(collectively "ICICI
Group"), are unable to exercise control or ensure or guarantee the
integrity of/over the contents of the information contained in e-mail
transmissions and further acknowledges that any views
expressed in this message are those of the individual sender and no
binding nature of the message shall be implied or assumed unless the sender
does so expressly with due authority of ICICI Group.Before opening any
attachments please check them for viruses and defects."



ForwardSourceID:NTA91E
--


"This e-mail message may contain confidential, proprietary or legally
privileged information. It
should not be used by anyone who is not the original intended recipient. If
you have erroneously
received this message, please delete it immediately and notify the sender.
The recipient
acknowledges that ICICI Bank or its subsidiaries and associated companies,
(collectively "ICICI
Group"), are unable to exercise control or ensure or guarantee the integrity
of/over the contents of the information contained in e-mail transmissions
and further acknowledges that any views
expressed in this message are those of the individual sender and no binding
nature of the message shall be implied or assumed unless the sender does so
expressly with due authority of ICICI Group.Before opening any attachments
please check them for viruses and defects."



-- 


"This e-mail message may contain confidential, proprietary or legally privileged 
information. It 
should not be used by anyone who is not the original intended recipient. If you have 
erroneously 
received this message, please delete it immediately and notify the sender. The 
recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies, 
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity of/over 
the contents of the information contained in e-mail transmissions and further 
acknowledges that any views 
expressed in this message are those of the individual sender and no binding nature of 
the message shall be implied or assumed unless the sender doe

Re: How can i avoid the use of & in a drop down box ?

2004-06-04 Thread John Antonakos
thank you, i understand now...
but unfortunately i cannot use that, cause im using javascript and 
HTML dynamic options (eg select1.options = new Option ('',''); )
using a pre-loaded list of data. Those data have & inside,
so there is nothing i can do on the matter, instead of creating
a javascript function to dynamically replace & with &.

I wanted to avoid this option, but its the only option i have.

Thanks anyway for the tips.. John

- Original Message - 
From: "Daniel Perry" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 5:16 PM
Subject: RE: How can i avoid the use of & in a drop down box ?




Daniel.

> -Original Message-
> From: John Antonakos [mailto:[EMAIL PROTECTED]
> Sent: 03 June 2004 15:10
> To: Struts Users Mailing List
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> where should i put that ?
> i never heard of it...
> 
> please give more info, where does it go ?
> to struts-config.xml or somewhere else ?
> In the Struts FormClass or inside the jsp tag ?
> 
> - Original Message - 
> From: "Rouven Gehm" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, June 03, 2004 5:01 PM
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> Have you tried to set filter="false" ???
> 
> 
> Rouven
> 
> - Original Message - 
> From: "John Antonakos" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, June 03, 2004 3:40 PM
> Subject: Re: How can i avoid the use of & in a drop down box ?
> 
> 
> > I am re-writing the question cause the stupid Outlook formatted my text
> > and made it without any meaning to it.
> > 
> -
> > We have some drop down boxes in our jsp's which take
> > data straight from the DB. Some of those data contain
> > the character &. (eg John & me).
> > We use a javascript array to store these data for internal
> > use in the page. The struts format those data.
> > When we use these data in a drop down (html select) appears
> > as (John & me) which obviously does not look good.
> > 
> > Is there a way to avoid this from happening ?
> > Can we say to the struts NOT to format the data coming from
> > the java objects ?
> > 
> -
> > i mean NOT to turn & to &, cause when it does it the drop down
> > says: "John & me", which looks ridiculous, doesnt it ?
> > 
> > - Original Message - 
> > From: "Kathy Zhou" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Thursday, June 03, 2004 4:26 PM
> > Subject: RE: How can i avoid the use of & in a drop down box ?
> > 
> > 
> > Have you tried to use & for &? just a thought.
> > 
> > Kathy
> > 
> > > -Original Message-
> > > From: Srinivas Rao [SMTP:[EMAIL PROTECTED]
> > > Sent: Thursday, June 03, 2004 8:07 AM
> > > To: Struts Users Mailing List
> > > Subject: Re: How can i avoid the use of & in a drop down box ?
> > > 
> > > Hi John,
> > > It is possible but i am not sure it is working or not 
> > > before inset into the database we will use Single quate( '  ' 
> ) to store
> > > the data, after u can access '&' symble from the database..
> > >  
> > > bye
> > > Srinivas
> > > 
> > > John Antonakos <[EMAIL PROTECTED]> wrote:
> > > We have some drop down boxes in our jsp's which take
> > > data straight from the DB. Some of those data contain
> > > the character &. (eg John & me).
> > > We use a javascript array to store these data for internal
> > > use in the page. The struts format those data.
> > > When we use these data in a drop down (html select) appears
> > > as (John & me) which obviously does not look good.
> > > 
> > > Is there a way to avoid this from happening ?
> > > Can we say to the struts NOT to format the data coming from
> > > the java objects ?
> > > 
> > > John Antonakos
> > > Software Engineer 
> > > Information Systems Department
> > > MedNet International Ltd www.mni.gr
> > > Tel. (+30) 210 6232085
> > > Fax (+30) 210 6232026
> > > Email: [EMAIL PROTECTED]
> > > 
> > > 
> > > 
> > > 
> > > -
> > > Do you Yahoo!?
> > > Friends.  Fun. Try the all-new Yahoo! Messenger
> > 
> > 
> > 
> > -
> > 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-m

Struts Validator & Date Patterns

2004-06-04 Thread Enrique Medina
Hi,
I would like to know if it's possible to indicate a validation of
type "date" indicating as a dattePatern/datePatternStrict a key from
an application resource message file. I mean, instead of:



datePatternStrictMMdd

to be able to indicate the "MMdd" dynamically (to be found
through a key in a resource bundle).
Thanks in advance,
Enrique Medina.
_
Reparaciones, servicios a domicilio, empresas, profesionales... Todo en la 
guía telefónica de QDQ. http://qdq.msn.es/msn.cfm

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


Re: Sorry : Semi-OT: Organizing WEB-INF/lib dir...

2004-06-04 Thread Mark Lowe
I think you perhaps what to organise you jars in a central place like
~/Projects/lib/struts-1.1
~/Projects/lib/hibernate-2.1
~/Projects/myapp/src
and such like
and then use ant to copy the dependencies into
~/Projects/myapp/build/WEB-INF/lib
at build time with an ant task.
This will give you the clarity of centralising your jars while not  
comprimising anything with the container spec.

Mark
On 4 Jun 2004, at 08:04, [EMAIL PROTECTED] wrote:
I think I am wrong. my experiment went a little wrong. soory about  
that. I think lib cannot be subdivided.

 Brati Sankar Ghosh
 Tata Consultancy Services
 Mailto: [EMAIL PROTECTED]
 Website: http://www.tcs.com

"Dan Tran" <[EMAIL PROTECTED]>
06/04/2004 11:23 AM
Please respond to
 "Struts Users Mailing List" <[EMAIL PROTECTED]>

To
"Struts Users Mailing List" <[EMAIL PROTECTED]>
cc
Subject
Re: Semi-OT: Organizing WEB-INF/lib dir...



Dont think jsp/servlet specs allows splitting of the lib
 dir.  You may want to take a look at maven.apache.org
 or use the way Maven names it dependencies jar files
 good luck.
 -Dan
 - Original Message -
 From: "Joe Hertz" <[EMAIL PROTECTED]>
 To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
 Sent: Thursday, June 03, 2004 10:29 PM
 Subject: RE: Semi-OT: Organizing WEB-INF/lib dir...
 > What IDE are you using? Can't it help you with this?
 >
 > JBuilder certainly spares me this hassle (okay, that's not all good.
 > I've had some *other* hassles* because of it, but they are certainly
 > worth it).
 >
 > > -Original Message-
 > > From: Riyad Kalla [mailto:[EMAIL PROTECTED]
 > > Sent: Thursday, June 03, 2004 11:59 PM
 > > To: Struts Users Mailing List
 > > Subject: Semi-OT: Organizing WEB-INF/lib dir...
 > >
 > >
 > > Quick question for the people more versed in web apps than
 > > me, can you
 > > organized your libs in your WEB-INF/lib dir into separate sub  
dirs? I
 > > ask because my project is using Struts and Hibernate right now,  
and
 > > there is a such a mish-mash of JARs forming in my WEB-INF/lib
 > > dir, that
 > > its hard for me to upgrade the right jars when a new release
 > > comes out.
 > > I'd like to have something like:
 > >
 > > WEB-INF/lib/struts
 > > WEB-INF/lib/hibernate
 > >
 > > or something to that extent. Can I do this?
 > >
 > > TIA
 > >
 > >  
-
 > > 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]
ForwardSourceID:NTAB2E    
- 

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] Good env for struts-based-web-tier and ejb components development

2004-06-04 Thread Navjot Singh
Thx for your inputs guys.

Ultraedit is good but not good for java development. I have been using it
for perl.
Jedit is also good but not as good as eclipse.

I have decided to adopt Eclipse+(MyEclipse+XDoclet)+Ant to start my project.
Quite powerful combination for me.

thx again.
navjot

>-Original Message-
>From: Andrea M. [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 03, 2004 8:37 PM
>To: 'Struts Users Mailing List'
>Subject: R: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>
>Mah
>Sincerely... there are features in IDEs that I don't know how would I do
>without.. like code insight... web descriptor (and even struts descriptor)
>editing.. and so on
>
>Of course I could do everything with notepad, but that often means getting
>crazy just to find a simple syntax error, or event to remember
>which methods
>are you inheriting up to the three.
>Noway.. I'll be a geek if you like but I don’t like to suffer with no
>reason.
>
>
>
>-Messaggio originale-
>Da: Marco Mistroni [mailto:[EMAIL PROTECTED]
>Inviato: giovedì 3 giugno 2004 15.50
>A: 'Struts Users Mailing List'
>Oggetto: RE: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>Hi there,
>   Jedit+xdoclet+mysql+junit+dbunit+maven
>
>And u would write code, generate what u need, test it and deploy
>It with one click..
>
>IDE r powerful, no doubt on that, but I prefer plain old notepad..
>If u end up getting acquainted with a powerful IDE, then as soon
>As u change it u get lost
>
>My 2 cents
>
>Regards
>   marco
>
>
>
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: 03 June 2004 06:12
>To: Struts Users Mailing List
>Subject: [OT] Good env for struts-based-web-tier and ejb components
>development
>
>Hi List,
>
>I am about to start development work on some auction site which in
>principle
>is similar to e-bay but not of that scale. I will be using J2EE+Jboss.
>
>What kind of IDE development environment do you guys use for the
>development?
>
>I just tried Eclipse + EasyStruts + Lomboz. Lomboz is good but not good
>enough.
>
>1. I still have to carefully edit ejb-jar and jboss files to make my
>things
>run.
>2. The directory structure that it creates in the background is not
>good.
>3. The xdoclet tags that it generates is for all servers. e.g JOnAs
>jboss,
>weblogic. but i need for only jboss.
>4. The build files that it generates are bit obscure.
>
>Easy Struts is just OK and doesn't provide much time saving to me. I can
>live without it also. Moreover, EasyStruts doesn't work with Eclipse
>3.0.
>
>In nutshell, the entire development environment becomes unorganized, if
>not
>complex.
>
>I wish to know what kinda env do you use? How do streamline your
>development
>process?
>
>TIA
>Navjot Singh
>
>
>-
>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]