RE: [OT] SQL Date to Util Date

2003-12-12 Thread Hajratwala, Nayan (N.)
A much simpler way of converting from a java.sql.Date to a java.util.Date is:

  java.sql.Date sqlDate = 


  java.util.Date utilDate = sqlDate;


This will work, since java.util.Date is the parent class...  However, I the original 
question wasn't so much how to convert an SQL to a UTIL (I think the subject line is 
incorrect), but rather how to simple display a date formatted on a JSP page.

As others have pointed out, this can be easily accomplished using the bean:format or 
JSTL tags. (preferrably JSTL).  There is no need to convert the sql.Date to a 
util.Date, since - as previously stated - util.Date is the parent.

Hope this helps.

- Nayan Hajratwala
  Chikli Consulting LLC
  http://www.chikli.com

-Original Message-
From: Raj Yadav [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 3:20 PM
To: 'Struts Users Mailing List'
Subject: RE: [OT] SQL Date to Util Date


Tiago,
This is what I have now.

public static java.util.Date sqlToUtil(java.sql.Date date)
{
 java.util.Date retDate = null;
  try
  {
  java.sql.Date incomingDate = date;
  String inDate = incomingDate.toString();
  System.out.println(indate =  + inDate);
  //SimpleDateFormat formatter = new
SimpleDateFormat(dd/MM/);
  DateFormat df = DateFormat.getDateInstance();
  //new DateFormat();
  retDate = df.parse(inDate);
  // = formatter.parse(inDate);
  //retDate = new java.util.Date(d.getTime());
  //retDate = (java.sql.Date)formatter.parse(incomingDate);
   }
   catch(ParseException prsEx)
   {
   System.out.println(Parsing Exception in Utils =  + prsEx);
   }
   return retDate;
}

Both the SimpleDateFormat and DateFormat gives me back 2003-12-11.

-raj


-Original Message-
From: Tiago Henrique Costa Rodrigues Alves
[mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 3:02 PM
To: 'Struts Users Mailing List'
Subject: RES: [OT] SQL Date to Util Date


Take a look at the DateFormat class (J2sdk API)

Tiago Henrique C. R. Alves
Analista de Sistemas
Politec - CSS
Tel: 3038-6952


-Mensagem original-
De: Raj Yadav [mailto:[EMAIL PROTECTED]
Enviada em: sexta-feira, 12 de dezembro de 2003 16:59
Para: [EMAIL PROTECTED]
Assunto: [OT] SQL Date to Util Date


Hi All,
I want to display date in a JSP page. It's coming from Oracle as
java.sql.Date (2003-12-11) I want to put it in displayable format and
put it in a JSP page. Something like 12/11/03. Someone please help me on
this.

Thanks,
-raj

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



RE: upgrading Struts 1.1 to jdk 1.4 and weblogic 8.1 -Compilatio n errors

2003-10-27 Thread Hajratwala, Nayan (N.)
I actually had this identical problem when upgrading to WL 8.  I was already using jdk 
1.4, so it must be a WS thing.  You should get the WL patch as well.

I switched my scriptlet to do the following, which worked fine.

params.put(airportCode, ((Airport)airportObj).getAirportCode() );

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Ruta Thakkar [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 27, 2003 10:39 AM
To: [EMAIL PROTECTED]
Subject: upgrading Struts 1.1 to jdk 1.4 and weblogic 8.1 -Compilation errors



Dear All,

I have been using Struts 1.1(stable release) with weblogic 6.1,jdk1.3..now we are 
upgrading to weblogic 8.1/jdk1.4

Here is the code that i was using earlier to pass multiple parameters in html:link:

logic:iterate id=airportObj name=airportList
bean:define id=airportCode name=airportObj property=airportCode /

tr 
%
java.util.HashMap params = new java.util.HashMap();
params.put(method, getAirportDetails);
params.put(airportCode, airportCode );
pageContext.setAttribute(paramsName, params);
%

td width=17%bean:write name=airportValObj property=airportCode /
/td
td 
html:link action=/groundservices  name=paramsName scope=page 
bean:write name=airportObj property=airportName /
/html:link
/td
/tr
/logic:iterate
this works fine with Weblogic 6.1 and jdk 1.3, But when i upgraded to jdk 1.4 
/weblogic 8.1,
it gives me an error:
cannot resolve symbol airportCode at line : params.put(airportCode, airportCode );


I know that jdk1.4 is stricter when it comes to compilation, but does this imply that 
the bean:define tag is not compiant with jdk1.4??

Pls guide me on how to proceed forward


Regds
Ruta


DISCLAIMER:

Information contained and transmitted by this E-MAIL is proprietary to Hexaware 
Technologies Limited and is intended for use only by the individual or entity to which 
it is addressed and may contain information that is privileged, confidential or exempt 
from disclosure under applicable law. If this is a forwarded message, the content of 
this E-MAIL may not have been sent with the authority of the Company. If you are not 
the intended recipient, an agent of the intended recipient or a person responsible for 
delivering the information to the named recipient, you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this information in 
any way or in any manner is strictly prohibited. If you have received this 
communication in error, please delete this mail  notify us immediately at [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]



Problem updating values from html:select

2003-09-19 Thread Hajratwala, Nayan (N.)
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects.  The outer loop iterates over 
each device.

Each Device contains a Collection of Parameter objects.  The inner loop iterates over 
each parameter.

The problem comes in the html:select  The values are displaying properly on the 
screen, but they are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!


  logic:iterate name=configureWorkstationForm property=devices id=device

html:form action=/configureWorkstationAction

bDevice Name:/b bean:write name=device property=name /br /
bDevice Type:/b bean:write name=device property=type.name /br /
  
bSettings:/b
table
  logic:iterate name=device property=type.parameters id=parameter
tdbean:define id=parameterId name=parameter property=id /
tr
  tdbean:write name=parameter property=name /:/td
  
  td
html:select name=device property='%=deviceParameterValue[ + 
parameterId + ]%'
  html:optionsCollection name=parameter property=parameterValues 
label=value value=value /
/html:select

  /td
/tr
  
  /logic:iterate
/table

input type=hidden name=currentDevice 
value=%=((DeviceVO)device).getId()% /
html:submit property=submitButton value=Delete /
html:submit property=submitButton value=Save /

/html:form

  /logic:iterate

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



RE: Problem updating values from html:select

2003-09-19 Thread Hajratwala, Nayan (N.)
Not directly on my form, but on the Device object, I have the following methods:

public String getDeviceParameterValue(int parameterId)
public void setDeviceParameterValue(int parameterId, String value)

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Re: Problem updating values from html:select



You did make the indexed setters in your Form, right? 

m

Hajratwala, Nayan (N.) [EMAIL PROTECTED]wrote: 
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects. The outer loop iterates over 
each device.

Each Device contains a Collection of Parameter objects. The inner loop iterates over 
each parameter.

The problem comes in the The values are displaying properly on the screen, but they 
are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!






Device Name: 

Device Type: 


Settings:




:


'









 [input]  name=currentDevice







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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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



RE: Problem updating values from html:select

2003-09-19 Thread Hajratwala, Nayan (N.)
Yep, that was the ticket ... Seems kind of odd ... Ah well, I'm happy =)
Thanks Mike!!

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 2:09 PM
To: Struts Users Mailing List
Subject: RE: Problem updating values from html:select


I'm fairly certain your ActionForm needs an indexed setter for the Device Objects, as 
well.  Give it a try.
 
m

Hajratwala, Nayan (N.) [EMAIL PROTECTED] wrote:
Not directly on my form, but on the Device object, I have the following methods:

public String getDeviceParameterValue(int parameterId)
public void setDeviceParameterValue(int parameterId, String value)

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 19, 2003 12:42 PM
To: Struts Users Mailing List
Subject: Re: Problem updating values from html:select



You did make the indexed setters in your Form, right? 

m

Hajratwala, Nayan (N.) wrote: 
Folks, I have the following jsp that is giving me a headache.

My ActionForm contains a Collection of Device objects. The outer loop iterates over 
each device.

Each Device contains a Collection of Parameter objects. The inner loop iterates over 
each parameter.

The problem comes in the The values are displaying properly on the screen, but they 
are not updating during the submit.

I am not getting any errors or anything .. Just no updated values.

Can anyone provide some insight?

Thanks!






Device Name: 

Device Type: 


Settings:




:


'









[input]  name=currentDevice







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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

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



RE: Newbie question :Rendering buttons of type submit and button

2003-07-29 Thread Hajratwala, Nayan (N.)
http://jakarta.apache.org/struts/userGuide/struts-html.html#submit

input type=submit name=Save value =Save

in struts becomes:

html:submit property=Save value=Save /


http://jakarta.apache.org/struts/userGuide/struts-html.html#button

input type=button name=Cancel value =Cancel

in struts becomes:

html:button property=Cancel value=Cancel /


Hope this helps!

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Jitesh Sinha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 12:24 PM
To: Struts Users Mailing List
Subject: Newbie question :Rendering buttons of type submit and button


Hi all,
How do you render following html with the help of struts-html tld :

input type=submit name=Save value =Save
input type=button name=Cancel value =Cancel

I don't have any other info like other parameters to include on pressing any
of the buttons .

Thanks,
Jitesh


-
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: Beginner

2003-07-22 Thread Hajratwala, Nayan (N.)
If the name of the form you are using is myform, and the property (field) name you 
want to output is abc with a value of xyz, you can do:

bean:write name=myform property=abc /

This will output

xyz


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Radu Focseneanu [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 22, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: Beginner


Hi, 
I'm a struts beginner, haven't read very much about it, but anyway, here is
my question - i suppose not a very difficult one.
I need to know which tag I could use for simply writng out the value of a
certain field in a html:form. More explicite, instead of writing out
input type=hidden value=xyz, i just need an output that goes: xyz.
Thanks a lot, Radu.


-
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: Upgrading to Struts 1.1

2003-07-01 Thread Hajratwala, Nayan (N.)
If you look near the bottom of your error messages, it says:

Caused by: java.lang.ClassNotFoundException:
org.apche.commons.logging.impl.SimpleLog

Possibly you don't have commons-logging in your project any more?


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Natalie D Rassmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 01, 2003 7:27 AM
To: Struts Users Mailing List
Subject: Upgrading to Struts 1.1


Hi,

Is anyone having trouble upgrading to Struts 1.1?  I upgraded to Struts
RC2 a few weeks ago no problem but when I try and upgrade to Struts 1.1;
I gett the following errors.  Can anyone help?

exception

javax.servlet.ServletException
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)

 at org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
 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:204)

 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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)

 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)

 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)

 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)

 at java.lang.Thread.run(Thread.java:536)

root cause

java.lang.ExceptionInInitializerError
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:140)
 at org.apache.jsp.index_jsp.class$(index_jsp.java:69)
 at
org.apache.jsp.index_jsp._jspx_meth_tiles_insert_0(index_jsp.java:69)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:52)
 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:204)

 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.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)

 at

RE: how to invoke the action servlet?

2003-03-27 Thread Hajratwala, Nayan (N.)
I think you'll want to go to http://localhost:8080/ginsu/ginsu.do

The first ginsu is the name of your webapp, the second ginsu.do part will invoke 
the ActionServlet.  This is because your web.xml indicates that anything with *.do 
should go to the ActionServlet.

The ActionServlet will check the struts-config.xml file and see that since you are 
looking for ginsu.do, it should find the action named ginsu, which is your first 
defined action-mapping.

Hope this helps!

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Dan Tarkenton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 3:32 PM
To: [EMAIL PROTECTED]
Subject: how to invoke the action servlet?



I have been referencing the book Struts in Action by Ted Husted as well as the struts 
site. I cannot figure out what to point my browser to in order to invoke struts. I 
have zero JSPs in my struts application -- I have no need for them because I am 
utilizing Model X where I have one XSLT servlet that represents my entire view layer. 
I thought I could just point my browser to http://localhost:8080/ginsu (ginsu being 
the name of my web app). I realize I have no index.html or index.jsp, but I'm just 
trying to go directly to the action servlet from the browser. 

Is this not possible in struts? 


Here is my struts-config file: 


snippet 
?xml version=1.0 encoding=ISO-8859-1 ? 
!DOCTYPE struts-config PUBLIC 
-//Apache Software Foundation//DTD Struts Configuration 1.0//EN 
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; 
struts-config 
!-- == Form Bean Definitions === -- 
form-beans 

!-- Example logon form bean 
form-bean name=logonForm 
type=org.apache.struts.example.LogonForm/ 
-- 
form-bean name=contentForm type=ginsu.ContentForm / 

/form-beans 

!-- == Global Forward Definitions == -- 
global-forwards 
!-- Example logon forward 
forward name=logon path=/logon.jsp/ 
-- 
/global-forwards 
!-- == Action Mapping Definitions == -- 
action-mappings 

action path=/ginsu 
type=ginsu.ContentAction 
name=contentForm 
!-- we want the xslServlet forward path attribute to point to XSL Servlet -- 
forward name=xslServlet path=/XSLServlet / 
/action 

action path=/admin/addFormBean 
type=org.apache.struts.actions.AddFormBeanAction/ 
action path=/admin/addForward 
type=org.apache.struts.actions.AddForwardAction/ 
action path=/admin/addMapping 
type=org.apache.struts.actions.AddMappingAction/ 
action path=/admin/reload 
type=org.apache.struts.actions.ReloadAction/ 
action path=/admin/removeFormBean 
type=org.apache.struts.actions.RemoveFormBeanAction/ 
action path=/admin/removeForward 
type=org.apache.struts.actions.RemoveForwardAction/ 
action path=/admin/removeMapping 
type=org.apache.struts.actions.RemoveMappingAction/ 
/action-mappings 
/struts-config 

/snippet


And here is my web.xml file: 


?xml version=1.0 encoding=ISO-8859-1? 

!DOCTYPE web-app 
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN 
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; 

web-app 
!-- Standard Action Servlet Configuration (with debugging) -- 
servlet 
servlet-nameaction/servlet-name 
servlet-classorg.apache.struts.action.ActionServlet/servlet-class 
init-param 
param-nameconfig/param-name 
param-value/WEB-INF/struts-config.xml/param-value 
/init-param 
init-param 
param-namedebug/param-name 
param-value2/param-value 
/init-param 
init-param 
param-namedetail/param-name 
param-value2/param-value 
/init-param 
load-on-startup2/load-on-startup 
/servlet 
!-- XSLT Servlet (View component)-- 
servlet 
servlet-nameXSLServlet/servlet-name 
servlet-classginsu.XSLServlet/servlet-class 
!-- init-param 
param-namexsl-file/param-name 
param-value/WEB-INF/test.xsl/param-value 
/init-param 
load-on-startup1/load-on-startup -- 
/servlet 

!-- XSLTServlet Mapping -- 
servlet-mapping 
servlet-nameXSLServlet/servlet-name 
url-pattern/XSLServlet/url-pattern 
/servlet-mapping 

!-- Struts Action Servlet Mapping -- 
servlet-mapping 
servlet-nameaction/servlet-name 
url-pattern*.do/url-pattern 
/servlet-mapping 



!-- The Usual Welcome File List -- 
welcome-file-list 
welcome-fileindex.jsp/welcome-file 
/welcome-file-list 


!-- Struts Tag Library Descriptors -- 
taglib 
taglib-uri/tags/struts-bean/taglib-uri 
taglib-location/WEB-INF/struts-bean.tld/taglib-location 
/taglib 

taglib 
taglib-uri/tags/struts-html/taglib-uri 
taglib-location/WEB-INF/struts-html.tld/taglib-location 
/taglib 

taglib 
taglib-uri/tags/struts-logic/taglib-uri 
taglib-location/WEB-INF/struts-logic.tld/taglib-location 
/taglib 

taglib 
taglib-uri/tags/struts-nested/taglib-uri 
taglib-location/WEB-INF/struts-nested.tld/taglib-location 
/taglib 

taglib 
taglib-uri/tags/struts-tiles/taglib-uri 
taglib-location/WEB-INF/struts-logic.tld/taglib-location 
/taglib 

/web-app 
/snippet 


I noticed that there is an element: 



RE: how to invoke the action servlet?

2003-03-27 Thread Hajratwala, Nayan (N.)
You are correct about the file location...  I'm assuming you meant struts-config.xml 
and not slide-config.xml .. I'm not sure if it matters, but be sure the directory is 
WEB-INF, not web-inf.

My suggestion to you would be to try and get the struts-example.war running ...

Just put the war file in your webapps directory (or unjar it there), then try to run 
the example.  If that works, you can slowly integrate your code into that webapp.  
Surely you will find the point at which it starts failing.

Good luck!

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Dan Tarkenton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 4:06 PM
To: Struts Users Mailing List
Subject: Re: how to invoke the action servlet?


Ah, I am sorry.  I forgot to mention that I had tried
different combinations of URLs.  I did try
http://localhost:8080/ginsu/ginsu.do and I get the
same tomcat error as when I enter
http://localhost:8080/ginsu .

I also realize how vague I was.  I'll try to be more
specific:  I am using Tomcat 4.1.18, and I get a 404
with a description of The requested resource is not
available when I try these different URLs. 

I went back to my %CATALINA_HOME%/webapp/ginsu
directory and discovered that my struts-config.xml
file was there.  I think this is incorrect.

The web.xml file and the struts-config.xml file both
need to reside in my
%CATALINA_HOME%/webapps/ginsu/WEB-INF directory,
correct?

So I moved the slide-config.xml to the web-inf
directory and restarted tomcat and received the same
results.

Any further thought?

Thanks again, and I appreciate the fast responses.
--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 
 
 On Thu, 27 Mar 2003, Dan Tarkenton wrote:
 
  Date: Thu, 27 Mar 2003 12:32:09 -0800 (PST)
  From: Dan Tarkenton [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
 [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: how to invoke the action servlet?
 
 
  I have been referencing the book Struts in Action
 by Ted Husted as well
  as the struts site. I cannot figure out what to
 point my browser to in
  order to invoke struts. I have zero JSPs in my
 struts application -- I
  have no need for them because I am utilizing Model
 X where I have one
  XSLT servlet that represents my entire view layer.
 I thought I could
  just point my browser to
 http://localhost:8080/ginsu (ginsu being the
  name of my web app). I realize I have no
 index.html or index.jsp, but
  I'm just trying to go directly to the action
 servlet from the browser.
 
  Is this not possible in struts?
 
 
 The URL of an action is composed like this:
 
  

http://${hostname}:${portnumber}${contextpath}${actionpath}
 
 So, if you install your webapp at context path
 /ginsu, and you want to
 invoke the action with a path of /ginsu (which
 appears to be the only
 one you've defined), the URL would be:
 
   http://localhost:8080/ginsu/ginsu.do
 
 since you are using extension mapping.  The first
 part (/ginsu) selects
 which web application, while the rest (/ginsu.do)
 selects the action.
 
 Craig
 

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


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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

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



[OT] RE: new String() vs String newStr =

2003-03-18 Thread Hajratwala, Nayan (N.)
Take a look at this link:

http://java.sun.com/docs/books/tutorial/java/data/stringsAndJavac.html

The section on Literal Strings should answer your question.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Butt, Dudley [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 1:48 PM
To: '[EMAIL PROTECTED]'
Subject: new String() vs String newStr = 


I know this isn't a struts question but i was hoping somone might be able to assist 
anyways.

Can anyone tell me the diference between the two statements:

String newStr = new String() 

String newStr = 


NOTICE: 

This message contains privileged and confidential information intended 
only for the person or entity to which it is addressed. 
Any review, retransmission, dissemination, copy or other use of, or 
taking of any action in reliance upon this information by persons or 
entities other than the intended recipient, is prohibited. 

If you received this message in error, please notify the sender 
immediately by e-mail, facsimile or telephone and thereafter delete the 
material from any computer. 

The New Africa Capital Group, its subsidiaries or associates do not 
accept liability for any personal views expressed in this message.

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

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



[OT] RE: how to get servletContext from httpsession ? (servlet api 2.2)

2003-03-18 Thread Hajratwala, Nayan (N.)
You can use HttpServlet.getServletContext()

... or if you are in a jsp/tag, PageContext.getServletContext()

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: david chan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 18, 2003 3:46 PM
To: Struts Users Mailing List
Subject: how to get servletContext from httpsession ? (servlet api 2.2)


Hi,
 My webapp use HttpSession.getServletContext() method
and works fine on tomcat 4.x. but not in websphere
4.x.
I just figure out HttpSession.getServletContext()
method is only avilable on servlet api 2.3.
 So in api 2.2, how can I do similar things? What I
need is in valueBound(HttpSessionBindingEvent se)
method to get an attribute from the application scope.
 With api 2.3, this seems so easy, but api 2.2 confuse
me. 
 
 Thanks.
David

__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

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

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



RE: Running example app on Websphere 4.0

2003-02-26 Thread Hajratwala, Nayan (N.)
I'm not sure that it matters, but does lib have to be lowercase, i.e. /WEB-INF/lib?

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Shkolnik, Mike [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 6:02 PM
To: 'Struts Users Mailing List'
Subject: RE: Running example app on Websphere 4.0


Initially, I just had it in one place - where it's suppose to be in
/WEB-INF/LIB/. But that didn't seem to work.

Thanks.

-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 2:56 PM
To: Struts Users Mailing List
Subject: Re: Running example app on Websphere 4.0


Mike:

I don't know anything about WebSphere, but thought you may like to know
this:
the time that I got a similar error NoClassDefFoundError was in fact when I
had
placed a jar in one place too many... not to be confused with the
ClassNotFoundError.  (I believe the error occurs when a class found in the
compilation path is not the same as the one found at run time. )  Since you
say
below that you tried to put the struts.jar in lots of places, maybe this is
the
problem..?  So try to remove the struts.jar from everywhere *except* one
place,
rebuild everything and then try again.

Regards,
Geeta

Shkolnik, Mike wrote:

 The link or file that you were trying to include is not there.

 Deploying example app directly to the WS 4.0 appserver does not seem to
 work.

 When I try to deploy and run my own struts application (not the example) I
 get following error:

 [2/25/03 10:52:01:630 PST] 37191c7f WebGroup  X Servlet
Error-[action]:
 Failed to load servlet: java.lang.NoClassDefFoundError:
 org/apache/struts/action/ActionServlet
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:254)
 at java.beans.Beans.instantiate(Beans.java:213)
 at java.beans.Beans.instantiate(Beans.java:57)
 at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet

 I tried to put the struts.jar everywhere I could think of, but it still
can
 not find it.

 When I deploy example application, I'm not getting above error, however
when
 I try to invoke any action from a browser I get File not found... error.

 Thanks.

 -Original Message-
 From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 2:03 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Running example app on Websphere 4.0

 Assuming you're trying to get it up and running in WSAD 4.0 or 5.0, here
is
 a bug-report that contains instructions on getting the example running in
 WSAD 5.0.  I imagine it should be similar for 4.0

 If you're simply trying to deploy it directly to the WS 4.0 appserver, you
 should be able to deploy the WAR file just like any other WAR file.

 ---
 - Nayan Hajratwala
 - Chikli Consulting LLC
 - http://www.chikli.com

 -Original Message-
 From: Shkolnik, Mike [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 4:51 PM
 To: '[EMAIL PROTECTED]'
 Subject: Running example app on Websphere 4.0

 Has anybody figured out how to run Struts example app on Websphere 4.0. I
 can't make it work. Any help is greatly appreciated.

 Thank you.

 -
 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: Running example app on Websphere 4.0

2003-02-25 Thread Hajratwala, Nayan (N.)
Assuming you're trying to get it up and running in WSAD 4.0 or 5.0, here is a 
bug-report that contains instructions on getting the example running in WSAD 5.0.  I 
imagine it should be similar for 4.0

If you're simply trying to deploy it directly to the WS 4.0 appserver, you should be 
able to deploy the WAR file just like any other WAR file.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Shkolnik, Mike [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:51 PM
To: '[EMAIL PROTECTED]'
Subject: Running example app on Websphere 4.0


Has anybody figured out how to run Struts example app on Websphere 4.0. I
can't make it work. Any help is greatly appreciated.
 
Thank you.

-
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: Running example app on Websphere 4.0

2003-02-25 Thread Hajratwala, Nayan (N.)
Sorry, here is the link

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15935

Your struts.jar and all the other jar files should be under the WEB-INF/lib directory. 
 Same as in the example app.



---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Shkolnik, Mike [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 5:18 PM
To: 'Struts Users Mailing List'
Subject: RE: Running example app on Websphere 4.0


The link or file that you were trying to include is not there. 

Deploying example app directly to the WS 4.0 appserver does not seem to
work.

When I try to deploy and run my own struts application (not the example) I
get following error:

[2/25/03 10:52:01:630 PST] 37191c7f WebGroup  X Servlet Error-[action]:
Failed to load servlet: java.lang.NoClassDefFoundError:
org/apache/struts/action/ActionServlet
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:254)
at java.beans.Beans.instantiate(Beans.java:213)
at java.beans.Beans.instantiate(Beans.java:57)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet

I tried to put the struts.jar everywhere I could think of, but it still can
not find it. 

When I deploy example application, I'm not getting above error, however when
I try to invoke any action from a browser I get File not found... error.

Thanks.


-Original Message-
From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 2:03 PM
To: 'Struts Users Mailing List'
Subject: RE: Running example app on Websphere 4.0


Assuming you're trying to get it up and running in WSAD 4.0 or 5.0, here is
a bug-report that contains instructions on getting the example running in
WSAD 5.0.  I imagine it should be similar for 4.0

If you're simply trying to deploy it directly to the WS 4.0 appserver, you
should be able to deploy the WAR file just like any other WAR file.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Shkolnik, Mike [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 4:51 PM
To: '[EMAIL PROTECTED]'
Subject: Running example app on Websphere 4.0


Has anybody figured out how to run Struts example app on Websphere 4.0. I
can't make it work. Any help is greatly appreciated.
 
Thank you.

-
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: javax.sql.DataSource

2003-02-14 Thread Hajratwala, Nayan (N.)
You have to include the jar file with javax.sql.Datasource on your build classpath.  I 
can't remember offhand which one this is, but it should be downloadable from 
http://java.sun.com.  It is included with Java SDK 1.4.1 by default.



---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Chiming Huang [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 10:47 AM
To: [EMAIL PROTECTED]
Subject: javax.sql.DataSource



Hi,

I am trying to use Struts 1.1-b3 with Java SDK 1.3.1_07.  In Eclipse, it complains 
about javax.sql.DataSource was indirectly referenced.  Is javax.sql.DataSource 
referenced by struts or any commons API?  How do I  get around with it?  Thanks.

Chiming



-
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

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




Struts officially supported at Ford

2003-01-23 Thread Hajratwala, Nayan (N.)
FYI … I thought people might be interested to know that Ford Motor Company has 
chosen Struts to use as their officially supported Servlet framework.  Interestingly, 
support is being provided through IBM although I'm not sure what they can offer above 
the user list =)

Here is the statement from the Java Center of Excellent website:

quote
The Ford Servlet Framework is a packaged version of Struts 1.1 provided by and 
supported by IBM. This download includes Struts provided by IBM with some custom 
integration of the other Frameworks and services provided by the Java COE. The Java 
COE will only be supporting the versions of Struts downloaded from here. Application 
teams should NOT be downloading Struts from the Jakarta website but are encouraged to 
use the website for learning and documentation.
/quote

I'd be interested to hear what people think about the last part of the quote… 
Currently, Ford is distributing 1.1b2.  I imagine there will be quite a delay before 
they actually distribute 1.1 final (when it comes out), which I don't think is in the 
best interest of the project teams.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com http://www.chikli.com 


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




RE: Struts officially supported at Ford

2003-01-23 Thread Hajratwala, Nayan (N.)
You're right, the quote does not say anything about 1.1b2, but I can assure you, that 
is what is being used.  It's probably written that way on the site so they don't have 
to change it so often =) .

They do plan to go to newer releases, but there is going to be a delay between the 
actual Struts release, the time it takes for IBM to OK it, and then the time it takes 
for Ford to OK IBM's OK.

Also, they haven't actually made any modifications to the distribution, but do include 
some logging stuff that ties into WebSphere (the Ford supported J2EE appserver).

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Mark Lepkowski [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 1:17 PM
To: Struts Users Mailing List
Subject: Re: Struts officially supported at Ford


I didn't read anything in the quote the mentioned v1.1b2.  It sounds to me like maybe 
IBM has tailored whatever beta version they started with to the point where they want 
their developers to use that as their common base.  

- Original Message - 
From: Karr, David [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 1:08 PM
Subject: RE: Struts officially supported at Ford


 It's certainly good that they're using 1.1, but somewhat unfortunate
 that they stopped at b2.  
(snip)
 
 -Original Message-
 From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 23, 2003 9:59 AM
 To: '[EMAIL PROTECTED]'
 Subject: Struts officially supported at Ford
 

(snip)

 quote
 The Ford Servlet Framework is a packaged version of Struts 1.1 provided
 by and supported by IBM. This download includes Struts provided by IBM
 with some custom integration of the other Frameworks and services
 provided by the Java COE. The Java COE will only be supporting the
 versions of Struts downloaded from here. Application teams should NOT be
 downloading Struts from the Jakarta website but are encouraged to use
 the website for learning and documentation.
 /quote
 
(snip)


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

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




RE: Struts officially supported at Ford

2003-01-23 Thread Hajratwala, Nayan (N.)
Yes, my understanding is that Solaris is out the door and Linux/Intel is in for new 
stuff.  I believe that WebSphere 5.0 will only be deployed on Linux here, so teams 
that want to upgrade will have to migrate from Solaris -- Linux

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 1:32 PM
To: 'Mark Lepkowski '; 'Struts Users Mailing List '
Subject: RE: Struts officially supported at Ford


Hmmm, great.  I'm a consultant for Ford, they taken a clear Open Source
initiative last year.  They are also implementing Linux and other Open
Source technologies.

Ilya

-Original Message-
From: Mark Lepkowski
To: Struts Users Mailing List
Sent: 1/23/03 11:16 AM
Subject: Re: Struts officially supported at Ford

I didn't read anything in the quote the mentioned v1.1b2.  It sounds to
me like maybe IBM has tailored whatever beta version they started with
to the point where they want their developers to use that as their
common base.  

- Original Message - 
From: Karr, David [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 1:08 PM
Subject: RE: Struts officially supported at Ford


 It's certainly good that they're using 1.1, but somewhat unfortunate
 that they stopped at b2.  
(snip)
 
 -Original Message-
 From: Hajratwala, Nayan (N.) [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, January 23, 2003 9:59 AM
 To: '[EMAIL PROTECTED]'
 Subject: Struts officially supported at Ford
 

(snip)

 quote
 The Ford Servlet Framework is a packaged version of Struts 1.1
provided
 by and supported by IBM. This download includes Struts provided by IBM
 with some custom integration of the other Frameworks and services
 provided by the Java COE. The Java COE will only be supporting the
 versions of Struts downloaded from here. Application teams should NOT
be
 downloading Struts from the Jakarta website but are encouraged to use
 the website for learning and documentation.
 /quote
 
(snip)


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

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




RE: Struts officially supported at Ford

2003-01-23 Thread Hajratwala, Nayan (N.)
Actually, the case is more impressive than you describe.

Struts won out over several custom frameworks that currently exist within ford and 
have quite a bit of political clout behind them.  What won out in the end was that 
there was no good cost-effective support model for the internal frameworks.  Too many 
resources would have to be spent supporting/updating the alternatives.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 2:59 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: RE: Struts officially supported at Ford




I agree here -

The typical big company response would've been to build their own custom
framework from the ground up. The fact that they chose to start with Struts
shows they put a good deal of thought into it and trusted the quality of
the work. It's very likely that they had internal projects be successful
using Struts and then ramped it up as a standard. I'm sure they did a great
deal of testing on it and had some camps pulling to build something custom.
There were likely other competing frameworks as well.

This is one of the greatest strengths of Open Source - as a large company
you can take the app and customize to your internal environment. For
example:

 - You could create abstract 'model' components that standardize they way
people throughout the company perform database access (or web sevice
access).

 - You could customize it to provide a standard method of acquiring and
storing user credentials so that all applications manage user information
the same way.

 - You could implement plug-ins to perform custom and standardized logging
(assuming there is a standard logging process already in place).

The possibilities are endless -

I'll bet anything this is not the last time we here of a Fortune 500
company adopting Struts for intrnal development.










   

   

 Craig R. McClanahan To: Struts Users Mailing List 
[EMAIL PROTECTED]  
 [EMAIL PROTECTED] cc: (bcc: Kevin 
Bedell/Systems/USHO/SunLife)
 01/23/2003 02:18 PM   Subject:  RE: Struts officially 
supported at Ford   
 Please respond to Struts 

 Users Mailing List   

   

   







On Thu, 23 Jan 2003, Karr, David wrote:


 It's certainly good that they're using 1.1, but somewhat unfortunate
 that they stopped at b2.  There were numerous fixes put in after b2,
 including the entire Struts-EL contribution.  Hopefully they can upgrade
 their support pretty quickly.


Don't give them too hard a time about this.

It's absolutely appropriate for organizations responsible for mission
critical software to be conservative in their version choices -- and every
such organization I'm familiar with puts any potential new version through
very extensive testing (for example, against existing apps or against any
in house customizations they did to the previous version) before putting
their stamp of approval on it.  Struts 1.1b3 hasn't been out long enough
to go through a cycle like that -- and, if I were in their shoes, given
the timing, I'd probably just skip certifying b3 and go certify 1.1 final.

What I'm very pleased about, though, is that Ford gets it in a different
respsect -- they didn't consider beta to be a four-letter word :-).

Craig


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





---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Hajratwala, Nayan (N.)
I have done this by setting up the initial values in the reset() method.

Is that not the correct way to do it?  If not, how do you switch between prepare 
actions and process actions?

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 3:48 PM
To: Struts Users Mailing List
Subject: RE: HOWTO pre-populate forms with data, then update ?


In general, Struts applications will use prepare actions to prepare
the data for a form, and process actions to process the submitted data
for a form.  In your prepare action code, you'll interface with your
business logic to obtain the required data, then populate fields of a
bean, probably in request scope, not session scope, then you'll forward
to your page view, which will use the request scope bean to populate the
form.  Your process action will then take the fields from the form
(populated from the HTML fields) and send the changed values to your
business logic.

Usually, you can avoid putting most of this bean data into the session
scope.

-Original Message-
From: Iain Sanderson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 12:21 PM
To: [EMAIL PROTECTED]
Subject: HOWTO pre-populate forms with data, then update ?

Newbie question:

I've managed to use Struts forms as a means of  initial data entry ( 
registration forms etc) but have got  stuck on how to use a form to
update 
data that already exists in a database. For example, a form where a user

can update their user details (address, email etc) and then submit the 
updates. How is this best done in struts ?

I'm sure there's a good way of doing this, but my Kludge so far has been

to  create a bean in the session scope containing the data I want to 
populate the form with ( eg a user's current address), and then use
struts 
 html:text  tags to view  the bean data using their name and
property 
attributes.   Once the user has submitted their updates, the ActionForm 
accesses the form bean to obtain the updates, and applies the updates to

the database.   I then of course have to update the  original bean's
data 
with the new values ( eg their amended address) and send it back into
the 
session scope.  It's a bit of a mess, but it works. 

I know there's a better way. Please help. Thanks.

Iain Sanderson
 

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

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




RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Hajratwala, Nayan (N.)
Depends on how hard you're going to flame me =)

Actually yes, but I'm guessing from your tone that I'm being a bad boy.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Iain Sanderson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 3:59 PM
To: Struts Users Mailing List
Subject: RE: HOWTO pre-populate forms with data, then update ?


Nayan,

Are you accessing the business logic ( or database) in the reset method to 
determine the initial values?

Iain


Please respond to Struts Users Mailing List 
[EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
cc: 

Subject:RE: HOWTO pre-populate forms with data, then update ?

I have done this by setting up the initial values in the reset() method.

Is that not the correct way to do it?  If not, how do you switch between 
prepare actions and process actions?

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Karr, David [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 3:48 PM
To: Struts Users Mailing List
Subject: RE: HOWTO pre-populate forms with data, then update ?


In general, Struts applications will use prepare actions to prepare
the data for a form, and process actions to process the submitted data
for a form.  In your prepare action code, you'll interface with your
business logic to obtain the required data, then populate fields of a
bean, probably in request scope, not session scope, then you'll forward
to your page view, which will use the request scope bean to populate the
form.  Your process action will then take the fields from the form
(populated from the HTML fields) and send the changed values to your
business logic.

Usually, you can avoid putting most of this bean data into the session
scope.

-Original Message-
From: Iain Sanderson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 23, 2003 12:21 PM
To: [EMAIL PROTECTED]
Subject: HOWTO pre-populate forms with data, then update ?

Newbie question:

I've managed to use Struts forms as a means of  initial data entry ( 
registration forms etc) but have got  stuck on how to use a form to
update 
data that already exists in a database. For example, a form where a user

can update their user details (address, email etc) and then submit the 
updates. How is this best done in struts ?

I'm sure there's a good way of doing this, but my Kludge so far has been

to  create a bean in the session scope containing the data I want to 
populate the form with ( eg a user's current address), and then use
struts 
 html:text  tags to view  the bean data using their name and
property 
attributes.   Once the user has submitted their updates, the ActionForm 
accesses the form bean to obtain the updates, and applies the updates to

the database.   I then of course have to update the  original bean's
data 
with the new values ( eg their amended address) and send it back into
the 
session scope.  It's a bit of a mess, but it works. 

I know there's a better way. Please help. Thanks.

Iain Sanderson
 

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

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





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




RE: errors when using struts1.1 but not in 1.0

2003-01-14 Thread Hajratwala, Nayan (N.)
Try deleting all your compiled jsp files (__jsp.java) and recompiling all your code.  
If you've got code based on 1.0, you likely have some code that is deprecated and that 
you should update before proceeding.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: aswath satrasala [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 14, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: errors when using struts1.1 but not in 1.0



Hello,
I get the following error messages while using struts 1.1b3
I don't get any errors while using struts 1.0


javax.servlet.jsp.JspException: Note: sun.tools.javac.Main has been 
deprecated.
C:\eclipse\workspace\workflow\Web 
root\WEB-INF\work\_viewallworkflows__jsp.java:0:
The method void doInsert(java.sql.Connection) declared in class 
com.transpak.dbbeans.WorkflowBean
cannot override the method of the same signature declared in class 
com.transpak.dbbeans.DBBean.
Their throws clauses are incompatible.
/*
^
C:\eclipse\workspace\workflow\Web 
root\WEB-INF\work\_viewallworkflows__jsp.java:0:
The method void doDelete(java.sql.Connection) declared in class 
com.transpak.dbbeans.WorkflowBean
cannot override the method of the same signature declared in class 
com.transpak.dbbeans.DBBean.
Their throws clauses are incompatible.
/*
^
C:\eclipse\workspace\workflow\Web 
root\WEB-INF\work\_viewallworkflows__jsp.java:0:
The method void doUpdate(java.sql.Connection) declared in class 
com.transpak.dbbeans.WorkflowBean
cannot override the method of the same signature declared in class 
com.transpak.dbbeans.DBBean.
Their throws clauses are incompatible.
/*
^
3 errors, 1 warning

at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:164)
at 
_wrapper._viewallworkflows_0wrapper__jsp._jspService(/workflow/wrapper/viewallworkflows_wrapper.jsp:15)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:497)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)


_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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

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




RE: [slightly OT] Time zone strategies

2002-12-02 Thread Hajratwala, Nayan (N.)
I didn't delve too much into the details of your current approach, but couldn't you do 
this fairly easily using the Calendar class...


  Date fromDb = ResultSet.getDate(...);
  Calendar cal = Calendar.getInstance(user's TimeZone, optionally user's Locale);
  cal.setTime(fromDb);

  Now you can manipulate/display the values in the user's timezone
  

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Ryan Olson [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 2:23 PM
To: Struts Users Mailing List
Subject: [slightly OT] Time zone strategies


Hi all,

Although this problem isn't necessarily unique to struts, it's certainly 
something that many of you may have come across in building struts 
applications. I'm writing a CRUD-type app to manage news articles which will 
support users in various time zones. Individual articles have date/time 
stamps which are normalized to the server reference timezone as they are 
stored in the model layer. However, each user should see and modify the dates 
in his/her own timezone on the presentation layer, optionally specifying 
alternate timezones if desired.

My current approach is the following (bear with me):

- business layer object ArticleBO contains a Date field populated from db with 
ResultSet.getDate()
- view layer ActionForm ArticleForm contains a Date object (internalDate) as 
well as String fields for date and time; internalDate is prepopulated from 
ArticleBO for view/edit actions
- Article JSP contains two text fields for date and time strings, which are 
not themselves prepopulated from the ArticleForm, but rather filled in as the 
page loads via JavaScripts which use internalDate.getTime() to create a 
localized JavaScript Date object and corresponding date/time strings for the 
form
- ArticleForm also contains a hidden field clientTimezoneOffset that is 
populated by JavaScript as (new Date()).getTimezoneOffset(), which is the 
client's GMT offset in minutes
- ArticleForm returns to my add/edit/whatever Action after validation, at 
which point the date/time strings are converted back to a Date object using a 
SimpleDateFormat. The SimpleDateFormat is set to the client's timezone using 
the offset information in the clientTimezoneOffset field. This is tricky 
because 
1. JavaScript-supplied values are the negative of what Java expects -- for 
example, California comes out as +8 (+7 DST) instead of -0800 (-0700 DST)
2. Since the offset value is adjusted for DST according to the local time on 
the client, the retrieval method must un-adjust it accordingly when setting 
the raw offset of the resulting TimeZone (which is DST-neutral)
- ArticleBO populated from ArticleForm now holds a Date object in the server's 
timezone

It took me awhile to figure that all out, and it seems to work well based on 
the testing I've done by setting the test lab machines' clocks/timezones 
every which way. It's an awfully convoluted process, though, and I don't like 
to rely on JavaScript. 

Has anyone else come up with a better solution? 

Thanks

Ryan Olson


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

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




RE: Can anybody tell how to use struts 1.1 beat version in WASD

2002-10-30 Thread Hajratwala, Nayan (N.)
just import the WAR file for the struts-example... it is really that simple.

I've done this successfully using WSAD 4.03


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: KISHORE KUMAR KOTA Rao [mailto:RKishore;covansys.com]
Sent: Wednesday, October 30, 2002 3:30 AM
To: 'Struts Users Mailing List'
Subject: Can anybody tell how to use struts 1.1 beat version in WASD


It will be really helpful for me.

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: PDF generation with Struts

2002-10-24 Thread Hajratwala, Nayan (N.)
not sure about integration w/ Struts, but take a look at FOP.  It is easy to use, and 
we have used it successfully in a couple instances.

http://xml.apache.org/fop/index.html

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Bruno Collet [mailto:b_collet;yahoo.com]
Sent: Thursday, October 24, 2002 9:23 AM
To: [EMAIL PROTECTED]
Subject: PDF generation with Struts


Hi all,
Is there an easy way to generate PDF documents using
Struts?
Bruno

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: PDF generation with Struts

2002-10-24 Thread Hajratwala, Nayan (N.)
that is what FOP does as well ... http://xml.apache.org/fop/index.html

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Daniel Jaffa [mailto:jaffad;courtinnovation.org]
Sent: Thursday, October 24, 2002 9:53 AM
To: Struts Users Mailing List
Subject: Re: PDF generation with Struts


I am using an cool product called xmlMill, you build an XML document then
you run a transformation on the xml page, and a PDF is gen'd.  Very cool,
very fast
dan
- Original Message -
From: Daniel Haynes [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 9:28 AM
Subject: RE: PDF generation with Struts


 Report Action from our app below

 Dan

 public ActionForward executeAction (ActionMapping mapping, ActionForm
form,
 HttpServletRequest request,

 HttpServletResponse response) throws Exception
{
 MessageResources messages = getResources(request);
 ActionMessages actionMessages = new ActionMessages();
   actionMessages.add(IConstants.SCREEN_TITLE_KEY, new
 ActionMessage(title.report));

 User user =
 (User)request.getSession().getAttribute(IConstants.USER_KEY);

 UserSession userSession =

(UserSession)request.getSession().getAttribute(IConstants.USER_SESSION_KEY);


 String userid = user.getUserid();
 String username = user.getUsername();
 String fmgid = user.getFmgID();
 String currentIntervalID = userSession.getIntervalID();
 String businessAreaID = userSession.getBusinessAreaID();
 String regionID = 1;
   String action = request.getParameter(action);
   ReportForm reportForm = (ReportForm)form;

   if (action.equals(New) || action.equals(Reset))
   {
 actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new
 ActionMessage(report.welcometext));
  // Populate the drop down fields
  reportForm.setReports(getReports());
  reportForm.setIntervals(getDropDownIntervals());
  reportForm.setIndustries(getAllDropDownIndustries());
  reportForm.setQualities(getOverallDropDownQualities());
  reportForm.setFMGGroups(getDropDownFMGGroups());
  reportForm.setBrokers(getDropDownBrokers());
 reportForm.setBrokerGroup(All);
  reportForm.setInterval(userSession.getIntervalID());
  // Set defaults
 reportForm.setReportType(1);
  reportForm.setMarkets(getDropDownMarkets());
 reportForm.setMarket(IConstants.ALL_INDICATOR);
reportForm.setBrokers(getFMGBrokersByMarket(fmgid,
 reportForm.getMarket()));

   }

   // The user has changed the report selection, just re-display the
new
 form format
   if (action.equals(Change))
   {
  actionMessages.add(ActionMessages.GLOBAL_MESSAGE, new
 ActionMessage(report.welcometext));

 // Update the markets drop down to contain the
 correct list (with or without All)
 // and ensure that the list of brokers is correct
 for the market classification
 int reportType =
 Integer.parseInt(reportForm.getReportType());
 switch(reportType)
 {
 case 1:
 reportForm.setMarkets(getDropDownMarkets());
 break;
 case 4:

 reportForm.setMarket(IConstants.ALL_INDICATOR);

 reportForm.setBrokers(getFMGBrokersByMarket(fmgid,
 IConstants.ALL_INDICATOR));
 break;
 case 5:
 reportForm.setMarkets(getAllDropDownMarkets());

 reportForm.setBrokers(getFMGBrokersByMarket(fmgid,
reportForm.getMarket()));
 break;
 default:
 reportForm.setMarkets(getAllDropDownMarkets());
 break;
 }
   }

   if (action.equals(Create Report))
   {
   Report report = new Report();
   report.setFmgID(fmgid);
   report.setReportType(reportForm.getReportType());
   report.setMarketID(reportForm.getMarket());
   report.setIndustryID(reportForm.getIndustry());
   report.setIntervalID(reportForm.getInterval());
   report.setBrokerID(reportForm.getBroker());
   report.setQualityID(reportForm.getQuality());
  report.setFMGGroupID(reportForm.getFMGGroup());
   report.setBusinessAreaID(businessAreaID);
   report.setRegionID(regionID);
 report.setCurrentIntervalID(currentIntervalID);
   report.setBrokerGroup(reportForm.getBrokerGroup());
   setReportNames(report);
   ReportAdapterService service = new ReportAdapterService();
   ByteArrayOutputStream stream = null;
   stream = service.getStream(report);

   if(stream != null)
   {
 response.setHeader(Content-Disposition,
 inline;filename=MyReport.pdf; );
 response.setContentType(application/pdf);
 response.setContentLength(stream.size());

 ServletOutputStream out = response.getOutputStream();
 stream.writeTo(out);
 out.flush();
 out.close();
 return null;
  }
  else
  {
  actionMessages.add(IConstants.USER_ACTION_FEEDBACK, new
 ActionMessage(report.noreport));
  }

   }
   saveMessages(request, actionMessages);
   return 

RE: JavaScript Validation: MinLength MaxLength Functions Don't Work

2002-10-24 Thread Hajratwala, Nayan (N.)
interesting ... sorry if this has been discussed to death already.  If so, i'll shut 
up. =)

Shouldn't the decision of displaying the validation be up to the application developer?

For example, when changing a password, you would have a spot to enter old  new 
passwords, but would likely want to put some validation around the new one (min 6 
characters, etc).  What would be wrong with displaying that info to the user?

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Dave Derry [mailto:dderry;acm.org]
Sent: Thursday, October 24, 2002 4:14 PM
To: Struts Users Mailing List
Subject: Re: JavaScript Validation: MinLength  MaxLength Functions
Don't Work


This has been explained before. I think it was by Ted. The reason has to do
with security. Specifying bouinds on the length of a password limits the
universe of potential passwords that a cracker would need to test. And of
course if he/she saw a message saying Password must be between 6 and 30
characters in length that would provide that information.

Dave Derry


- Original Message -
From: bachan s [EMAIL PROTECTED]



 Can you try removing the required from the depends for password and give
minlength and maxlength. Since minLength is mentioned required is not
necesary.
 Try it and let ue know.
 this may be considered as a bug in struts too.
 Thanks !
 Bachan

  Nekkalapudi, Viplava [EMAIL PROTECTED] wrote: My team can't get
the Struts client-side (i.e. JavaScript) validation
 framework to work. We want to ensure that a password is between 6 and 30
 characters. Has anyone been able to get these checks to work? The
required
 field check works, but the minlength and maxlength do not. Here's what
 our validation.xml file contains:


 depends=required


 depends=required,minlength,maxlength





 minlength
 6


 maxlength
 30




 Thanks,

 JOHN




--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:struts-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org




RE: How to use datasource and db connection pooling in struts?

2002-10-15 Thread Hajratwala, Nayan (N.)

you can use commons-dbcp ... see http://jakarta.apache.org/commons/dbcp.html

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 10:40 AM
To: [EMAIL PROTECTED]
Subject: How to use datasource and db connection pooling in struts?


Hi, there!

How can I easily achieve database connection pooling (using a datasource
in one of the xml config files - btw. which one is it?)? 
I know there is some stuff in jakarta-commons. 
What I want to achieve is an easy to configure and highly efficient db
connection pool that is available to all my action classes.

Stef.

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

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




RE: connection pools

2002-10-07 Thread Hajratwala, Nayan (N.)

adolfo,

take a look at commons-dbcp for database pooling 

http://jakarta.apache.org/commons/dbcp.html

and commons-pool for generic pooling

http://jakarta.apache.org/commons/pool.html

Good luck!  You can direct any questions you have about using it to the commons-user 
mailing list.


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 07, 2002 10:15 AM
To: [EMAIL PROTECTED]
Subject: connection pools


Hi All,

a quick question. I just need references to open source database connection 
pools available for checking out. I know Poolman and Protomatter.

Does Apache provides any more complete pool? Any nicer pool anywhere?

TIA,

Adolfo.





_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

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




RE: Need Help Fast

2002-09-26 Thread Hajratwala, Nayan (N.)

Essentially, he is saying you can rewrite your doStartTag method to be something like:

  private List _states = null;

  public int doStartTag() throws JspException {

if (_states == null) {
  _states = new java.util.ArrayList();
  _states.add(new com.ubspw.cdd.common.LabelValueBean(-Select One-, ));
  _states.add(new com.ubspw.cdd.common.LabelValueBean(AK,AK));
  _states.add(new com.ubspw.cdd.common.LabelValueBean(AL,AL));
  _states.add(new com.ubspw.cdd.common.LabelValueBean(AR,AR));
  ...
  ...
}

pageContext.setAttribute(selectStates, _states);
return (EVAL_BODY_INCLUDE);
  }  

this way, states will only be set up the first time doStartTag is called.


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:14 AM
To: 'Struts Users Mailing List'
Cc: '[EMAIL PROTECTED]'
Subject: RE: Need Help Fast


Can you please send me a sample of a better way

-Original Message-
From: Ville Peurala [mailto:
Sent: Thursday, September 26, 2002 8:26 AM
To: Struts Users Mailing List
Subject: RE: Need Help Fast


Hello,

One possible solution:

Put the ArrayList in application context and put a check in doStartTag()'s
beginning to determine whether the list of states can be found in
application context.

Instead of:

pageContext.setAttribute(selectStates, states);

Put it like this:

pageContext.setAttribute(selectStates, states,
PageContext.APPLICATION_SCOPE);

And in the beginning of doStartTag():

Object o = pageContext.getAttribute(selectStates,
PageContext.APPLICATION_SCOPE);
if (o == null) { ...do what your current code does...
}
else { ...do nothing... }

But why do this in a tag at all? If your list of states never changes, you
might as well initialize it in an init() method somewhere.

T: Ville Peurala


-Original Message-
From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]]
Sent: 26. syyskuuta 2002 15:13
To: 'Struts Users Mailing List'
Subject: Need Help Fast


This is not really a struts question but I am using struts a maybe someone
can help.  I system has allot of state dropdown's so I I made a tag for the
programmers to insert into the JSP pages. 

The Tag builds a ArrayList with the states in it and then saves the states
as a attribute in the pageContext. But I don't know if this is the best way
to do it.  Is it anyway to tell this code only to run one time and then stay
in member?

Below is my sample code: Please help me out

public int doStartTag() throws JspException {

java.util.ArrayList states = new java.util.ArrayList();
states.add(new com.ubspw.cdd.common.LabelValueBean(-Select
One-, ));
states.add(new com.ubspw.cdd.common.LabelValueBean(AK,
AK));
states.add(new com.ubspw.cdd.common.LabelValueBean(AL,
AL));
states.add(new com.ubspw.cdd.common.LabelValueBean(AR,
AR));
states.add(new com.ubspw.cdd.common.LabelValueBean(AZ,
AZ));
states.add(new com.ubspw.cdd.common.LabelValueBean(CA,
CA));
states.add(new com.ubspw.cdd.common.LabelValueBean(CO,
CO));
states.add(new com.ubspw.cdd.common.LabelValueBean(CT,
CT));
states.add(new com.ubspw.cdd.common.LabelValueBean(DC,
DC));
states.add(new com.ubspw.cdd.common.LabelValueBean(DE,
DE));
states.add(new com.ubspw.cdd.common.LabelValueBean(FL,
FL));
states.add(new com.ubspw.cdd.common.LabelValueBean(GA,
GA));
states.add(new com.ubspw.cdd.common.LabelValueBean(HI,
HI));
states.add(new com.ubspw.cdd.common.LabelValueBean(IA,
IA));
states.add(new com.ubspw.cdd.common.LabelValueBean(ID,
ID));
states.add(new com.ubspw.cdd.common.LabelValueBean(IL,
IL));
states.add(new com.ubspw.cdd.common.LabelValueBean(IN,
IN));
states.add(new com.ubspw.cdd.common.LabelValueBean(KS,
KS));
states.add(new com.ubspw.cdd.common.LabelValueBean(KY,
KY));
states.add(new com.ubspw.cdd.common.LabelValueBean(LA,
LA));
states.add(new com.ubspw.cdd.common.LabelValueBean(MA,
MA));
states.add(new com.ubspw.cdd.common.LabelValueBean(MD,
MD));
states.add(new com.ubspw.cdd.common.LabelValueBean(ME,
ME));
states.add(new com.ubspw.cdd.common.LabelValueBean(MI,
MI));
states.add(new com.ubspw.cdd.common.LabelValueBean(MN,
MN));
states.add(new com.ubspw.cdd.common.LabelValueBean(MO,
MO));
states.add(new com.ubspw.cdd.common.LabelValueBean(MS,
MS));
states.add(new com.ubspw.cdd.common.LabelValueBean(MT,
MT));
states.add(new com.ubspw.cdd.common.LabelValueBean(NC,
NC));

RE: logging in struts

2002-09-23 Thread Hajratwala, Nayan (N.)

Agreed that some previous posts have been pretty sketchy, but it seems to me that in 
this case he may have just misunderstood the question logging in struts to mean 
logging in IN struts... in which case his suggestion is probably valid.



---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 2:41 PM
To: Struts Users Mailing List
Subject: Re: logging in struts


Disregard this garbage.  I don't know who this guy is or what in the 
world he thinks he's doing, but many here have filtered him out.  Don't 
be led astray by his unintelligible jibberish.

Zahid Rahman wrote:

Here is a suggestion!
Download chapter 21 of  JSP PRO second edition from www.wrox.com
It shows a complete struts application for a Shopping cart.
It has login form, logout form etc.


-- 
Eddie Bush




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

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




RE: content management ideas?

2002-09-12 Thread Hajratwala, Nayan (N.)

Unfortunately,  I don't believe this is a very practical approach.

A content editor may inadvertantly make a change to a tag without even
noticing it (search  replace, fat-finger, etc).  Then after they upload
their change to the server and spend a few hours trying to figure out why it
is displaying an error, they call you, the developer to debug the problem.
You then compare the previous version (you are using source control, right?)
with the modified version to see what the problem is... yada-yada.

We use an approach of having a template which contains all of our base
html .. header, footer, etc.  The content editors can create whatever they
want (we encourage valid XHTML, but usually don't get anything for our
efforts), and upload it to the test servers.  Our framework then pulls the
content into the template via a custom tag (using java.io.*).

Hope this helps... Happy to provide more details if you need.

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Kenny Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 4:01 PM
To: Struts Users Mailing List
Subject: RE: content management ideas?


Hi Bryan,

..but that's what JSP is designed to be... html developer friendly. Once you
create the page with all of the struts tags, they should just be able to
code the html and content around the JSP. I know it's not exactly what you
were expecting, but my suggestion would be to let them modify the JSP, just
instruct them that they are not supposed to touch the JSP tags.

Kenny Smith
JournalScape.com

-Original Message-
From: Bryan Field-Elliot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 1:09 PM
To: Struts Users Mailing List
Subject: content management ideas?


I was wondering how people handle frequent content updates with
Struts/JSP? At my company, I'm building a site for which much of the
static content (including things like the CSS stylesheet) will
probably undergo frequent revision. I'd like to open it up for easier
access, such as via FrontPage, so that I (the programmer) am not in the
middle of such changes. But the site is very dynamic, with almost all
page fetches resulting in a database query and dynamic content being
built. So the site needs to be JSP-based, and I don't want the
aforementioned Frontpagers modifying the raw JSP pages.

Opinions appreciated on how this compromise can best be reached,

Bryan





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

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




RE: jndi as a data source

2002-09-10 Thread Hajratwala, Nayan (N.)

Here's some code that I wrote to use LDAP through the Commons Pooling
mechanism... I'm still trying to figure out a good way to validate the
connection using the validateObject method, so that part is likely not
optimal.

There are 2 classes:
* LdapConnectionFactory, which implements
BasePoolableObjectFactory
* HRLdap uses the LdapConnectionFactory

Here is the code that then can use HRLdap:

HRLdap ldap = new HRLdap();
ldap.executeCdsIdLookup(cdsId);
String buCode = ldap.getBusinessUnitCode();
...
...
...

I've tried to strip out some stuff that is only applicable in the
environment here, but hopefully this helps.

I'd be interested in anyone else's feedback on this as well in case i'm
doing something stupid =)


=
import org.apache.commons.pool.BasePoolableObjectFactory;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;

/**
 * @version $Revision:   1.1  $
 * @author Nayan Hajratwala [EMAIL PROTECTED]
 */
public class LdapConnectionFactory extends BasePoolableObjectFactory {

private static Log logger_ = Log.getInstance();

private static Hashtable env_ = null;

private static Object lock_ = new Object();

private Hashtable getEnvironment() {
if (env_ == null) {
synchronized(lock_) {
if (env_ == null) {
env_ = new Hashtable();

FrameworkEnvConfig props =
FrameworkEnvConfig.getInstance();


env_.put(Context.INITIAL_CONTEXT_FACTORY,
com.sun.jndi.ldap.LdapCtxFactory);
env_.put(Context.PROVIDER_URL,
ldap://; + props.getProperty(hronline.ldap.default.host) + 

: + props.getProperty(hronline.ldap.default.port));

env_.put(Context.SECURITY_AUTHENTICATION, simple);

env_.put(Context.SECURITY_PRINCIPAL,
props.getProperty(hronline.ldap.default.auth.dn));

env_.put(Context.SECURITY_CREDENTIALS,
props.getProperty(hronline.ldap.default.auth.pwd));

// Ford LDAP servers are version
2 servers.  If we don't specify this, then some strange
// results occur.  Namely,
Non-ASCII characters are not returned properly.

env_.put(java.naming.ldap.version, 2);
}
}
}

return env_;
}


public Object makeObject() {

try {
return new InitialDirContext(getEnvironment());
}
catch (NamingException e )
{
logger_.error(this, Exception during creation
of LDAP connection., e);
return null;
}
}
public void destroyObject(Object o) {

try {
((DirContext)o).close();
}
catch(NamingException e)
{
logger_.error(this, Exception during expire of
LDAP connection., e);
}
}

public boolean validateObject(Object o) {
try {
((DirContext)o).getAttributes(test);
}
catch (Exception e) {
logger_.error(this, Exception during Ldap
Connection validation);
return false;
}

return true;
}

}
=

=
import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.StackObjectPool;

import java.util.HashMap;
import java.util.Map;

import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchResult;

/**
 * This class provides the necessary methods to obtain LDAP data from
CDS
 * pre
 *   Rev 1.27   Aug 27 2002 16:00:32   nhajratw
 *fixes from synchronization code review.
 *
 *   Rev 1.26   Aug 26 2002 14:23:30   nhajratw
 *updates for synchronization fixes, franchiseFactory  search engine.
 * /pre
 * @version $Revision:   1.27  $
 * @author Nayan Hajratwala [EMAIL PROTECTED]
 */
public class HRLdap {

private static final String ATTR_NAME_BUILDING_COUNTRY  = c;
private static final String ATTR_NAME_CDSID
= uid;
private static final 

RE: Improving performance by splitting JSP?

2002-09-10 Thread Hajratwala, Nayan (N.)

Was it a Hashtable or HashMap?

It might be that since Hashtable is synchronized you were encountering a
bottleneck in your multithreaded environment, whereas just a regular loop
would not have this problem...

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 11:48 AM
To: Struts Users Mailing List
Subject: RE: Improving performance by splitting JSP?



I had to go back and look at the test code we used, but yes - looks like we
did try a non-body tag.  It did a hashtable lookup for whatever key values
was passed in as a parameter.  I remember we found that we could only
recreate the performance discrepancy with tags that did some kind of memory
lookup; just adding loops around arithmetic statements are writing output
were tried, but did not exhibit the symptoms.

Jim Weaver
Software Developer - ThoughtWorks


 

  Martin Cooper

  martin.cooper@tumbTo:   'Struts Users
Mailing List' [EMAIL PROTECTED]  
  leweed.comcc:

 Subject:  RE: Improving
performance by splitting JSP? 
  09/09/2002 05:24 PM

  Please respond to

  Struts Users

  Mailing List

 

 







 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 09, 2002 2:51 PM
 To: Struts Users Mailing List
 Subject: RE: Improving performance by splitting JSP?



 Yup, we looked at overall size of the JSP as well, and the
 association with
 performance was definitely number of bm/bw tags within a
 single JSP rather
 than overall JSP size.  We even tried editing the generated
 servlet code
 and adding big unused methods to see if the problem had to do with
 generated servlet file size.  That would kind've made sense, but was a
 negative.  I believe we also tried a tag that just did a
 sysout rather than
 any kind of memory lookup (hashtable or properties file) and
 found that
 this performance quirk in the sun vm did not appear in that case.

When you wrote your own tags (the message/write equivalents, I mean), did
you happen to play with body versus non-body tags? When I was wrestling
with
the too many tags problem a while ago, I ended up writing my own versions
of some of the Struts tags so that they were non-body tags, because they
caused noticeably less code to be generated. I didn't measure performance
differences, but I wouldn't be surprised to see a noticeable improvement
there too.

--
Martin Cooper



 We could never pin down a why, it seemed that the sun 1.3 vm
 just ran like
 a snail with a lot of bm or bw tags in a single page, so we
 stopped doing
 that ;-).  Same number of tags split up into multiple JSPs,
 or a few tags
 called the same number of times via a loop - OK performance.

 It is very true also that splitting them up into smaller
 bites makes them
 more readable and maintainable, so it was a good solution all
 around.  It's
 just that you are always nervous when you fix a problem and
 don't know the
 why of it ;-).

 Jimbo



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




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







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

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




RE: ConcurrentModificationException when using nested:iterate tag

2002-09-03 Thread Hajratwala, Nayan (N.)

A ConcurrentModificationException occurs when you have an Iterator, and then modify 
the underlying collection, then try to use the iterator again...

example (with bounds checking removed):

   List list = new ArrayList();
   // populate list...

   Iterator i = list.iterator();

   Object o = i.next();

   list.remove(o);

   // CME thrown here... 
   Object o2 = i.next();

The usual way to resolve these problems is to add and remove through the Iterator or 
ListIterator rather than directly to the underlying collection.  To fix the above, you 
would replace list.remove(o) with i.remove(o)
  
So, in your example, on the line:

   miaForm.addParm(new fw_MenuItemParmVO(null, null, false));

you are modifying the FastArrayList in the middle of the iteration.

Hope this helps!


---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: David Tam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 2:12 AM
To: [EMAIL PROTECTED]
Subject: ConcurrentModificationException when using nested:iterate tag


i am using Struts 1.1b2 with tiles on BES 5.0.2(tomcat 4.0.1).  i ve got the
following form:


public final class fw_MenuItemAdminForm extends ActionForm {

private List parmsAL = new FastArrayList();
private Collection parms = col1.lazyList(parmsAL, fw_MenuItemParmVO.class);

public void addParm(fw_MenuItemParmVO theParm){
parms.add(theParm);
}

public Collection getParms(){
return parms;
}

}

and here is my jsp:

table
tr
tdbean:message key=menuItemAdminForm.parmKey/:/td
tdbean:message key=menuItemAdminForm.parmVal/:/td
/tr
nested:iterate id=menuItemParms property=parms type=fw_MenuItemParmVO
tr
 tdnested:write property=parmKey /nested:hidden property=parmKey //td
 tdnested:write property=parmVal /nested:hidden property=parmVal //td
/tr
/nested:iterate

/table



when my dispatch action class is being called the following method is being
executed:

public ActionForward addParm(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception{

fw_MenuItemAdminForm miaForm = (fw_MenuItemAdminForm)form;

logger.debug(addParm:: miaForm.getParms().size() =  + 
miaForm.getParms().size());

miaForm.addParm(new fw_MenuItemParmVO(null, null, false));

return (mapping.findForward(success));

}



the link to the success forward is ok(can tell from the log) but the servlet
container is throwing concurrentmodificationexception!  anybody knows y is this
happening??  seems that it could get though the action but when the servlet
container is formatting the HTML(or running the generated xxx$jsp.java) there is
this wierd problem (the following is the log i ve got from the app. server).


137908 [VBJ ThreadPool Worker] DEBUG
hk.com.dbsvickers.webapp.framework.sms.fw_MenuItemAdminAction  - addParm::
miaForm.getParms().size() = 0
processActionForward(menuItemAdmin.AddLayout, false)
insert page='/jsp/NavSideBar.jsp'.
insert page='/jsp/NavTopBar.jsp'.
insert page='/jsp/basicLayout.content.jsp'.
insert page='/jsp/menuItemAdminDetailsPane.jsp'.
ApplicationDispatcher[/SMS_Web]: Servlet.service() for servlet jsp threw
exception
java.util.ConcurrentModificationException
 at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:440)
 at java.util.AbstractList$Itr.next(AbstractList.java:413)
 at org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:423)
 at
org.apache.struts.taglib.nested.logic.NestedIterateTag.doAfterBody(NestedIterate
Tag.java:157)
 at
org.apache.jsp.menuItemAdminDetailsPane$jsp._jspService(menuItemAdminDetailsPane
$jsp.java:960)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:2
02)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:679)
 at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.j
ava:570)
 at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.jav
a:493)
 at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:818)
 at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:390)
 at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:8
65)
 at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:487)
 at
org.apache.jsp.basicLayout$content$jsp._jspService(basicLayout$content$jsp.java:
336)
 at 

RE: [VOTE] Should this list discontinue it's long, treasured heri tage of relaxed fridays?

2002-08-30 Thread Hajratwala, Nayan (N.)

Do you feel this list should discontinue it's long heritage of relaxed fridays?

(   )  Yes
( x )  No

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com

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




RE: Hesitation leads to NullPointerException

2002-08-26 Thread Hajratwala, Nayan (N.)

are you sure that you haven't set the session timeout to 30 *seconds*?

Be careful to notice what the units being used by the timeout parameter
are... (minutes, seconds, milliseconds, etc)

---
- Nayan Hajratwala
- Chikli Consulting LLC
- http://www.chikli.com


-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 26, 2002 11:54 AM
To: Struts-User
Subject: Hesitation leads to NullPointerException


Using Struts 1.0.2 on Tomcat 4.0.2

bizarre.alert

I have a problem that only occurs if the user lingers on a page for a while
(say a few minutes).  If after this duration, the user triggers any action,
the application crashes with a NullPointerException.

I have debugged the exception as being caused by a null property of the form
bean.   The question is this: how did the list get to be null.  Why does it
become null only if the user lingers?

The form bean (ProductsListBean) contains :

  private ArrayList products;
  public List getProducts() { return products; }

This list is used to display a collection of products for the user to select
(so, I know that the list is non-null  non-empty).  In the processing of
the user action, the following logic can be found

  ...
  List products = productsListBean.getProducts();
  Iterator iterator = products.iterator();
  ...

Obviously, (since the list is null) the application throws the exception at
the second line above.  

/bizarre.alert

Since the stack trace on the browser didn't indicate the Root Cause I went
looking for the Tomcat log -- it said the same thing that was on the
browser.  No more information. 

BTW my session timeout is set to 30 minutes and the this problem presents
itself if the user pauses for 2-3 minutes.


Sri

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