Wrapping response object .. does it works ??!!

2003-09-05 Thread Hany Al-Shafey
Hi,

I spent nearly 3 weeks on a response wrapping problem, I didn't yet figured 
out the cause, I'm deploying my web app to JRUN4 server. the problem arise 
when I tried to filter struts actions (*.do) with a response wrapping 
filter, so in WEB.XML I wrote :


   My Response Wrapper
   filters.WrapperFilter
 

   My Response Wrapper
   *.do

the code in my filter is  :

WrapperFilter.java
-
OutputStream out = response.getOutputStream();
out.write("PRE HTML FOR TEST ".getBytes());
GenericResponseWrapper wrapper = new GenericResponseWrapper 
((HttpServletResponse) response);
chain.doFilter(request, wrapper);
out.write(wrapper.getData());
out.write("POST HTML FOR TEST".getBytes());
out.close();
==

GenericResponseWrapper.java :
---
package filters;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
public class GenericResponseWrapper extends HttpServletResponseWrapper {
private ByteArrayOutputStream output;
private int contentLength;
private String contentType;
public GenericResponseWrapper(HttpServletResponse response) {
  super(response);
  output = new ByteArrayOutputStream();
  }
public byte[] getData() {
  return output.toByteArray();
  }
public ServletOutputStream getOutputStream() {
  return new FilterServletOutputStream(output);
  }
public void setContentLength(int length) {
  this.contentLength = length;
  super.setContentLength(length);
  }
public int getContentLength() {
  return contentLength;
  }
public void setContentType(String type) {
  this.contentType = type;
  super.setContentType(type);
  }
public String getContentType() {
  return contentType;
  }
public PrintWriter getWriter() {
  return new PrintWriter(getOutputStream(), true);
  }
}

when an action URL (http://localhost:8100/emgr/login.do) is called in 
browser,the page shows NOTHING ,that action is doing certain process and 
than forwarding to tile defininition : main.home.page ,  the logged error is 
:

jrun.servlet.io.ClosedIOException: Response has been closed
at jrun.servlet.io.ClosedOutputStream.write(ClosedOutputStream.java:23)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
at jrun.servlet.http.WebOutputStream.write(WebOutputStream.java:64)
at java.io.OutputStream.write(OutputStream.java:58)
at filters.WrapperFilter.doFilter(WrapperFilter.java:176)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
   .
Also I noticed that the same filter is working fine if my action is 
forwarding to a JSP  instead of a tiles definition name
so instead of mapping the filter to *.do I mapped it to *.jsp :


   My Response Wrapper
   *.jsp

that time the page shows correctly with the pre/post text embedded.
I'm confused, is it a struts , tiles or JRUN problem ?
any help will be appreciated.

Regards.

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


RE: Compile Error for bean:define

2003-09-05 Thread Carey Nation
It _may_ be, and I'm just shooting in the dark here, that it's defined by
default someplace other than as a local variable (like in the request).  Try
adding scope="page" to the bean:define and see if that makes any difference.

HTH,
Carey


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 11:11 PM
To: [EMAIL PROTECTED]
Subject: Compile Error for bean:define


I am using  tag in my jsp pages as





but when I run my application, I got compile error message that actionValue
couldn't be solved in line .

Can anybody give me a hand??

Thanks.

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



Compile Error for bean:define

2003-09-05 Thread wxy3291
I am using  tag in my jsp pages as





but when I run my application, I got compile error message that actionValue 
couldn't be solved in line .

Can anybody give me a hand??

Thanks.

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



Re: Converting a ResultSet to a List of POJOs

2003-09-05 Thread Kris Schneider
So far, I think I prefer JSTL's Result interface for this type of operation:

import javax.servlet.jsp.jstl.sql.Result;
import javax.servlet.jsp.jstl.sql.ResultSupport;
...
ResultSet rs = ...;
Result result = ResultSupport.toResult(rs);
request.setAttribute("result", result);
...
Here's the javap on Result:

interface javax.servlet.jsp.jstl.sql.Result{
public abstract java.util.SortedMap[] getRows();
public abstract java.lang.Object[][] getRowsByIndex();
public abstract java.lang.String[] getColumnNames();
public abstract int getRowCount();
public abstract boolean isLimitedByMaxRows();
}
You can find more details in the JSTL spec in the SQL Actions section.

Matt Raible wrote:
Dear Struts Experts,

I recently started a new project where most of the backend code is already
written with JDBC and ResultSets.  The ResultSets are iterated through and a
POJOs values are set using pojo.setName(rs.getString("...")), etc. - you get
the point.  I'm wondering if there's an easier way - so I could do something
like this:
ResultSet rs = stmt.executeQuery("SELECT ...");
List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
object.class);
Hibernate let me do this very simply - and I miss the fact that I could type
a line or two to get a List of POJOs.  

  List users = ses.createQuery("from u in class " + User.class
   + "order by u.name").list();
I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
interesting way of doing this - is this the "recommended" approach in the
JDBC world?  Here's an example using it:
   ResultSet rs = stmt.executeQuery("SELECT ...");
   RowSetDynaClass rsdc = new RowSetDynaClass(rs);
   rs.close();
   stmt.close();
   ...;// Return connection to pool
   List rows = rsdc.getRows();
   ...;   // Process the rows as desired
Thanks,

Matt
--
Kris Schneider 
D.O.Tech   


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


SimpleMenuItem from TilesAction - NullPointerException

2003-09-05 Thread Miguel Angel Martin
Hello.

I'm trying access to Tiles context attributes from an 
TilesAction.   I've a definition where I put a list of 
SimpleMenuItems:
... 
 
   classtype="org.apache.struts.tiles.beans.SimpleMenuItem"/> 
...

In the execute method of the TilesAction

...
ArrayList lportlets = (ArrayList) 
context.getAttribute("portlets");
Iterator it = lportlets.iterator();
while( it.hasNext() )   {
 SimpleMenuItem plt = (SimpleMenuItem) it.next() ;
 
} 

Just in the last line (SimpleMenuItem plt = 
(SimpleMenuItem) it.next() ;) an 
java.lang.NullPointerException ocurs.   

But I write the value of it.next() before 
(System.out.println(it.next();) , I get
SimpleMenuItem[value=1, link=.portlet.noticias, 
tooltip=Noticias, ]

¿What's wrong?

Thank you.

Miguel Angel Martin.
Malaga (Spain)
--
Amplia tus posibilidades de ganar más con el nuevo Depósito 5%
http://ingdirect.ozu.es/
--
Correo enviado desde http://www.ozu.es


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


RE: Converting a ResultSet to a List of POJOs

2003-09-05 Thread Micael
Okay, gotcha.  At least it had a List.  LOL.

At 06:20 PM 9/5/2003 -0500, you wrote:
This is what I'm trying to get away from.

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 5:19 PM
To: Struts Users Mailing List
Subject: Re: Converting a ResultSet to a List of POJOs
I assume you don't mean something like:


 List list = null;
 try {
   list = Collections.synchronizedList(new LinkedList());
   User user = null;
   CompositeEntity composite = new CompositeEntity();
   while(rs.next()) {
 user = composite.getUserVO();
 user.setId(rs.getInt("id"));
 user.setUsername(rs.getString("username"));
 user.setPassword(rs.getString("password"));
 user.setName(rs.getString("name"));
 user.setEmail(rs.getString("email"));
 user.setType(rs.getString("type"));
 user.setStatus(rs.getInt("status"));
 user.setTime(rs.getLong("time"));
 list.add(user);
   }
   pstmnt.close();
   pstmnt = null;
 } catch(SQLException sqle) {
   throw new ChainedException(sqle, "HsqlUserDAO: rs.next(): " +
sqle.getMessage());
 }
 return list;
But, if you do, there it is:

Micael

At 05:49 PM 9/5/2003 -0500, you wrote:
>Dear Struts Experts,
>
>I recently started a new project where most of the backend code is already
>written with JDBC and ResultSets.  The ResultSets are iterated through and
a
>POJOs values are set using pojo.setName(rs.getString("...")), etc. - you
get
>the point.  I'm wondering if there's an easier way - so I could do
something
>like this:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
>object.class);
>
>Hibernate let me do this very simply - and I miss the fact that I could
type
>a line or two to get a List of POJOs.
>
>   List users = ses.createQuery("from u in class " + User.class
>+ "order by u.name").list();
>
>I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
>interesting way of doing this - is this the "recommended" approach in the
>JDBC world?  Here's an example using it:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>RowSetDynaClass rsdc = new RowSetDynaClass(rs);
>rs.close();
>stmt.close();
>...;// Return connection to pool
>List rows = rsdc.getRows();
>...;   // Process the rows as desired
>
>
>Thanks,
>
>Matt
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged.  This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited.  If you
have received this transmission in error, please delete the message.  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]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


RE: Converting a ResultSet to a List of POJOs

2003-09-05 Thread Micael
I might as well go ahead and state boldly what I was trying to imply, 
Matt.  If you notice the CompositeEntity, then you can imagine altering 
that to include two changes to the norm.  First, you can make all the 
composite entities of the same type, and, second, you can change 
.getUserVO() to getVO(rs, object.class) pretty easily, right?  Or, do you 
want the entire thing to be done by reflection?  If not, tucking the SQL 
into the CompositeEntity might work for you.  No?

Si?

Micael

At 06:20 PM 9/5/2003 -0500, Matt Raible wrote:
This is what I'm trying to get away from.

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 5:19 PM
To: Struts Users Mailing List
Subject: Re: Converting a ResultSet to a List of POJOs
I assume you don't mean something like:


 List list = null;
 try {
   list = Collections.synchronizedList(new LinkedList());
   User user = null;
   CompositeEntity composite = new CompositeEntity();
   while(rs.next()) {
 user = composite.getUserVO();
 user.setId(rs.getInt("id"));
 user.setUsername(rs.getString("username"));
 user.setPassword(rs.getString("password"));
 user.setName(rs.getString("name"));
 user.setEmail(rs.getString("email"));
 user.setType(rs.getString("type"));
 user.setStatus(rs.getInt("status"));
 user.setTime(rs.getLong("time"));
 list.add(user);
   }
   pstmnt.close();
   pstmnt = null;
 } catch(SQLException sqle) {
   throw new ChainedException(sqle, "HsqlUserDAO: rs.next(): " +
sqle.getMessage());
 }
 return list;
But, if you do, there it is:

Micael

At 05:49 PM 9/5/2003 -0500, you wrote:
>Dear Struts Experts,
>
>I recently started a new project where most of the backend code is already
>written with JDBC and ResultSets.  The ResultSets are iterated through and
a
>POJOs values are set using pojo.setName(rs.getString("...")), etc. - you
get
>the point.  I'm wondering if there's an easier way - so I could do
something
>like this:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
>object.class);
>
>Hibernate let me do this very simply - and I miss the fact that I could
type
>a line or two to get a List of POJOs.
>
>   List users = ses.createQuery("from u in class " + User.class
>+ "order by u.name").list();
>
>I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
>interesting way of doing this - is this the "recommended" approach in the
>JDBC world?  Here's an example using it:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>RowSetDynaClass rsdc = new RowSetDynaClass(rs);
>rs.close();
>stmt.close();
>...;// Return connection to pool
>List rows = rsdc.getRows();
>...;   // Process the rows as desired
>
>
>Thanks,
>
>Matt
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain
information belonging to the sender which may be confidential and legally
privileged.  This information is intended only for the use of the
individual or entity to whom this electronic mail transmission was sent as
indicated above. If you are not the intended recipient, any disclosure,
copying, distribution, or action taken in reliance on the contents of the
information contained in this transmission is strictly prohibited.  If you
have received this transmission in error, please delete the message.  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]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


RE: Converting a ResultSet to a List of POJOs

2003-09-05 Thread Matt Raible
This is what I'm trying to get away from.

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 5:19 PM
To: Struts Users Mailing List
Subject: Re: Converting a ResultSet to a List of POJOs


I assume you don't mean something like:


 List list = null;
 try {
   list = Collections.synchronizedList(new LinkedList());
   User user = null;
   CompositeEntity composite = new CompositeEntity();
   while(rs.next()) {
 user = composite.getUserVO();
 user.setId(rs.getInt("id"));
 user.setUsername(rs.getString("username"));
 user.setPassword(rs.getString("password"));
 user.setName(rs.getString("name"));
 user.setEmail(rs.getString("email"));
 user.setType(rs.getString("type"));
 user.setStatus(rs.getInt("status"));
 user.setTime(rs.getLong("time"));
 list.add(user);
   }
   pstmnt.close();
   pstmnt = null;
 } catch(SQLException sqle) {
   throw new ChainedException(sqle, "HsqlUserDAO: rs.next(): " + 
sqle.getMessage());
 }
 return list;

But, if you do, there it is:

Micael

At 05:49 PM 9/5/2003 -0500, you wrote:
>Dear Struts Experts,
>
>I recently started a new project where most of the backend code is already
>written with JDBC and ResultSets.  The ResultSets are iterated through and
a
>POJOs values are set using pojo.setName(rs.getString("...")), etc. - you
get
>the point.  I'm wondering if there's an easier way - so I could do
something
>like this:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
>object.class);
>
>Hibernate let me do this very simply - and I miss the fact that I could
type
>a line or two to get a List of POJOs.
>
>   List users = ses.createQuery("from u in class " + User.class
>+ "order by u.name").list();
>
>I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
>interesting way of doing this - is this the "recommended" approach in the
>JDBC world?  Here's an example using it:
>
>ResultSet rs = stmt.executeQuery("SELECT ...");
>RowSetDynaClass rsdc = new RowSetDynaClass(rs);
>rs.close();
>stmt.close();
>...;// Return connection to pool
>List rows = rsdc.getRows();
>...;   // Process the rows as desired
>
>
>Thanks,
>
>Matt
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  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: Converting a ResultSet to a List of POJOs

2003-09-05 Thread Micael
I assume you don't mean something like:


List list = null;
try {
  list = Collections.synchronizedList(new LinkedList());
  User user = null;
  CompositeEntity composite = new CompositeEntity();
  while(rs.next()) {
user = composite.getUserVO();
user.setId(rs.getInt("id"));
user.setUsername(rs.getString("username"));
user.setPassword(rs.getString("password"));
user.setName(rs.getString("name"));
user.setEmail(rs.getString("email"));
user.setType(rs.getString("type"));
user.setStatus(rs.getInt("status"));
user.setTime(rs.getLong("time"));
list.add(user);
  }
  pstmnt.close();
  pstmnt = null;
} catch(SQLException sqle) {
  throw new ChainedException(sqle, "HsqlUserDAO: rs.next(): " + 
sqle.getMessage());
}
return list;

But, if you do, there it is:

Micael

At 05:49 PM 9/5/2003 -0500, you wrote:
Dear Struts Experts,

I recently started a new project where most of the backend code is already
written with JDBC and ResultSets.  The ResultSets are iterated through and a
POJOs values are set using pojo.setName(rs.getString("...")), etc. - you get
the point.  I'm wondering if there's an easier way - so I could do something
like this:
ResultSet rs = stmt.executeQuery("SELECT ...");
List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
object.class);
Hibernate let me do this very simply - and I miss the fact that I could type
a line or two to get a List of POJOs.
  List users = ses.createQuery("from u in class " + User.class
   + "order by u.name").list();
I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
interesting way of doing this - is this the "recommended" approach in the
JDBC world?  Here's an example using it:
   ResultSet rs = stmt.executeQuery("SELECT ...");
   RowSetDynaClass rsdc = new RowSetDynaClass(rs);
   rs.close();
   stmt.close();
   ...;// Return connection to pool
   List rows = rsdc.getRows();
   ...;   // Process the rows as desired
Thanks,

Matt

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


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


RE: Combining struts and JSTL tags...

2003-09-05 Thread Loren Hall
i haven't found a resolution to a problem previously posted under another
subject, since it fits this topic I thought
i'd put it out there again.

I started my app using struts tags, and recently incorporated jstl.

Unfortunately I get an error when I import both struts-bean.tld and c.tld

c.tld:   http://java.sun.com/jstl/core)
struts-bean.tld:
http://jakarta.apache.org/struts/tags-bean-1.0.2)

i.e. when these 2 taglib directives appear on a single .jsp

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

i get the following exception:  jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".



FULL ERROR MESSAGE
```

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException:

jsp.error.tlv.invalid.page

null: org.xml.sax.SAXParseException: Attribute "xmlns:bean" was already
specified for element "jsp:root".

at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.
java:105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430
)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112
)
at
org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
at
org.apache.jasper.compiler.Validator.validate(Validator.java:613)
at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:230)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
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(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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:594)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)

Loren Hall




-Original Message-
From: Siggelkow, Bi

Converting a ResultSet to a List of POJOs

2003-09-05 Thread Matt Raible
Dear Struts Experts,

I recently started a new project where most of the backend code is already
written with JDBC and ResultSets.  The ResultSets are iterated through and a
POJOs values are set using pojo.setName(rs.getString("...")), etc. - you get
the point.  I'm wondering if there's an easier way - so I could do something
like this:

ResultSet rs = stmt.executeQuery("SELECT ...");
List objects = FancyUtilitity.convertResultSetToListOfObjects(rs,
object.class);

Hibernate let me do this very simply - and I miss the fact that I could type
a line or two to get a List of POJOs.  

  List users = ses.createQuery("from u in class " + User.class
   + "order by u.name").list();

I've looked at the RowSetDynaClass (http://tinyurl.com/mekh), which has an
interesting way of doing this - is this the "recommended" approach in the
JDBC world?  Here's an example using it:

   ResultSet rs = stmt.executeQuery("SELECT ...");
   RowSetDynaClass rsdc = new RowSetDynaClass(rs);
   rs.close();
   stmt.close();
   ...;// Return connection to pool
   List rows = rsdc.getRows();
   ...;   // Process the rows as desired


Thanks,

Matt

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



RE: how to start a background process using a struts action ?

2003-09-05 Thread Michael Korolyov
You may go with Quartz.
Where in your actions you just get user input and stores it (by Delegator / DAO) to 
Quartz table.

Or you can start / run new thread / class that has implemented Runnable interface.

That up to your business logic.

Best Regards.
Michael.


-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 10:11 AM
To: 'Struts Users Mailing List'
Subject: how to start a background process using a struts action ?

Hi Folks !

Does anyone here know if is possible to start a background
process ( like a daemon/service) using an action ? I need this feature
because the user will input a few parameters and a schedule date then
the system generate the user specific information.

Im using struts 1.1 and Toncat 4.1.18, so any tips on how can I
accomplish this task ?

Regards !

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[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]



Christopher Seekamp/Raleigh/IBM is out of the office.

2003-09-05 Thread Christopher Seekamp




I will be out of the office starting September 5, 2003 and will not return
until September 15, 2003.

I will respond to your message when I return. If earlier action is
necessary, please contact my manager, Brandon Smith.


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



artimus_1_1

2003-09-05 Thread Caroline Jen
I tried to deploy the artimus_1_1 application and I
followed the instructions in the README file that was
bundled with the artimus_1_1.war.

I successfully logged into the application, using the
username: artimus and password: g0rd0n. 

I continued to followed the instructions.  I  selected
"Create Resources" from the Manager's Options, and
press GO. At this point, I got the following message
on the top of the screen:

The process did not complete. Details should follow. 
ERROR: java.lang.NullPointerException

Please advise me what to do with it.  Thanks a lot. 

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: how to start a background process using a struts action ?

2003-09-05 Thread José Gustavo Zagato
Thanks !!

Your Answer was really helpful for me !!

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]


-Original Message-
From: Steve Hall [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 16:54
To: 'Struts Users Mailing List'
Subject: RE: how to start a background process using a struts action ?

José,

This is really a system design question rather than a Struts
specific question so I've add the [OT] to the subject.  I've seen an
implementation similar to what you're asking about.  I'm not sure if
what I
can contribute will help you with your situation.  
Something to keep in mind is that you want to encapsulate the
different layers of your system from each other as much as possible.
You
want to use Struts to collect data and pass it to the lower layers of
your
system for processing, then return the results to the user.  You
wouldn't
want a Struts Action class doing business logic or Thread control etc.
[stepping off of the soap box]

Here's what you could do:

Process Definitions:  Create a DB table, xml doc, properties file,
whatever
that contains a definition of all the processes you'll need to running.
If
these are Java classes, this data could contain the fully qualified
class
name.

Process Request Queue:  Create a DB table, JMS queue or some other
persistence mechanism to queue up you process requests.

Front End:  Create your Struts front end to capture the request data and
persist it to your Process Request Queue.  

Daemon: Write a daemon class that polls your Process Request Queue and
runs
the requested process.  You can get as fancy with this as you want, you
could: multi-thread it, use a Strategy Pattern (GOF) to allow it to run
different process types, integrate email as an output distribution
mechanism, etc.  All the daemon really needs to know how to do is poll
your
Request Queue and when it sees a Request, run the appropriate process
based
on the Process Definition.  Obviously, each Request must have an ID back
to
a Process Definition along with any parameters that the process
requires.
You'd run this daemon in a separate JVM, not in Tomcat's.  For
performance
reasons, you may even run it on a different server than the one running
Tomcat.  If you executed your process in your Struts class you wouldn't
have
this option.

I hope this  at least gives you something to think about.

Steve Hall 
Programmer Analyst 
Alterra Healthcare 
(414) 918 5636 
[EMAIL PROTECTED] 





-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:11 PM
To: 'Struts Users Mailing List'
Subject: how to start a background process using a struts action ?


Hi Folks !

Does anyone here know if is possible to start a background
process ( like a daemon/service) using an action ? I need this feature
because the user will input a few parameters and a schedule date then
the system generate the user specific information.

Im using struts 1.1 and Toncat 4.1.18, so any tips on how can I
accomplish this task ?

Regards !

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This email may contain confidential protected health information.  This
information is intended only for the use of the individual or entity to
which it is addressed.  The authorized recipient of this information is
prohibited from disclosing this information to any other party unless
required to do so by law or regulation and is required to destroy the
information after its stated need has been fulfilled.  If you are not
the
intended recipient, you are hereby notified that any disclosure,
copying,
distribution, or action taken in reliance on the contents of this email
is
STRICTLY PROHIBITED.  If you have received this email in error, please
notify the sender immediately and arrange for the return or destruction
of
the contents of this email.  If you continue to receive emails from this
sender, please contact Alterra's Family Connection Hotline at
877-400-5296.

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





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



Re: [OT] Character Encoding

2003-09-05 Thread Jason Lea
Yann Lebreton wrote:

As part of localizing a site, I'm trying to set the content type of the response. Now I now I can do this within the JSP (<%@ page contentType="text/html; charset=UTF-8" %> ). 
But I'd rather do this globally. I found out that you can set this as a parameter of the controller in struts. This would work fine if the JSP compiler wasn't also setting the content type automatically.

So do someone know a container setting to do this ? Is there something like a "pre-compiler" for JSP, that would change/add code to each JSP before giving it to the JSP compiler ?

Thanks,
Yann
I had this problem when I pre-compiled my JSPs (Tomcat 4.1.24).

If I don't pre-compile then (from memory) they were encoded correctly. 
I am using tiles, so the layout page set the encoding to UTF-8, then 
everything else is included into the layout.  This might be why it 
worked, as the encoding was set on the parent JSP it was probably used 
when compiling the included pages.

When pre-compiling the JSPs each page is compiled separately.  In this 
case I think it used the default Latin encoding.

I couldn't find a way to forcethe compiler to use a different encoding 
other than adding <%@ page contentType="text/html; charset=UTF-8"%> to 
the top of every JSP page (including it didn't seem to work).

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


Re: [OT] Character Encoding

2003-09-05 Thread Jason Lea
Have a look here for an example of what you have to do to get the 
response encoded correctly:

http://www.anassina.com/struts/i18n/i18n.html

Yann Lebreton wrote:
did you set the character encoding on the request before getting the data to the db ?
if you don't the input may be interpreted using the default JVM's encoding.
-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:53 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Character Encoding
Hey Yann Lebreton !

I have the same doubt as you, but for time constraints we decide
to use the encode at the JSP.
I have some questions about Internationalizations and maybe you
/ someone else could give me a more clear perspective on this subject...
I' am developing a site wich must run under several languages,
including Chinese, Thay, and many many others. I build several small
applications to prove that the location / I18N works fine on struts for
showing messages at the HTML. But My current concern is those input text
fields... How Can I handle the user Input ? I will save all entered data
in a Oracle database (already prepared to work with Unicode), but during
testing every time that I save some data in Unicode format the Database
don't understand it.
	Does anyone here have any hint on this stuff ?

Cheers !	

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]
-Original Message-
From: Yann Lebreton [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 13:46
To: [EMAIL PROTECTED]
Subject: [OT] Character Encoding

As part of localizing a site, I'm trying to set the content type of the
response. Now I now I can do this within the JSP (<%@ page
contentType="text/html; charset=UTF-8" %> ). 
But I'd rather do this globally. I found out that you can set this as a
parameter of the controller in struts. This would work fine if the JSP
compiler wasn't also setting the content type automatically.

So do someone know a container setting to do this ? Is there something
like a "pre-compiler" for JSP, that would change/add code to each JSP
before giving it to the JSP compiler ?
Thanks,
Yann


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



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


RE: Syntax for accessing an object nested in a List of Lists [SOLVED]

2003-09-05 Thread Robert Taylor
Yep. Tried it and it failed as well.

robert

> -Original Message-
> From: Jason Lea [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 9:35 AM
> To: Struts Users Mailing List
> Subject: Re: Syntax for accessing an object nested in a List of Lists
> [SOLVED]
>
>
> Did you try list[index][index].property?
>
> It is too late for me to test (1:34am - going to bed)
>
> Robert Taylor wrote:
> > Okay. After looking at PropertyUtils I determined that this
> sort of syntax
> > is not allowed when accessing an object from an ArrayList of ArrayLists.
> > You have to wrap the child lists in an object which provides
> some type of
> > accessor/mutator. So in my case I have an ArrayList of
> ListWrapper objects.
> > Where each ListWrapper contains a List and getList()/setList(). Then the
> > syntax below
> > works - assuming my form bean has the methods getList()/setList().
> >
> > list[index].list[index].property
> >
> >
> > Kind of a PIA to have to wrap the nested lists. Seems like PropertyUtils
> > would contain logic to recognize this use case but as I look at
> the source
> > code for getIndexedProperty, the necessary modifications would be none
> > trivial.
> >
> > robert
> >
> >
> >>-Original Message-
> >>From: Robert Taylor [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, September 04, 2003 5:15 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Syntax for accessing an object nested in a List of Lists
> >>
> >>
> >>I've run into some trouble accessing a nested object in my form.
> >>The object "lives" in a List of Lists type of structure.
> >>
> >>I've been using a syntax like the following assuming my List form
> >>property is named 'list'.
> >>
> >>list[index].[index].productId
> >>
> >>This must be wrong because I get the following exception:
> >>
> >>No getter method available for property list[0].[0].productId for
> >>bean under
> >>name org.apache.struts.taglib.html.BEAN'
> >>
> >>I tried the following just to make sure it could find the 'first level'.
> >>
> >>list[index]
> >>
> >>This doesn't cause any exceptions, so I must have the syntax
> >>wrong for accessing the 'second level' of the structure.
> >>
> >>
> >>Any help would be appreciated?
> >>
> >>robert
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>-
> >>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]
> >
> >
>
>
> --
> Jason Lea
>
>
> -
> 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: Failing to get an answer,can it be done?

2003-09-05 Thread Mike Jasnowski
Are you sure the value isn't getting reset before it gets to your page? I
assume no exceptions are being thrown which prevent the field from
initializing, I saw earlier you're initializing this value in the
constructor.  What happens if you just leave the value assigned from the
private instance var and have the accessor retrive that w/o the stuff in the
constructor?

> 

>From your example, I also assume you retrieved the MapForm object from the
session in the proper scope?

-Original Message-
From: Das, Amar [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 4:37 PM
To: 'Struts Users Mailing List'
Subject: RE: Failing to get an answer,can it be done?




Thanks. But it is not working.
In my form bean (MapForm) I am setting the following variable
public class MapForm extends ActionForm {

  /* Map Source*/
  private String
mapSource="http://geo.tpmc.com/output/dqs_GEO2056217212.jpg";;
  .

  public MapForm(){
try {

mapSource = map.getMapOutput().getURL();
.

Then on my jsp page I am using the following


Any suggestion?

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 3:16 PM
To: Struts Users Mailing List
Subject: RE: Failing to get an answer,can it be done?

Sure,



or wi html-el

mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 2:24 PM
To: [EMAIL PROTECTED]
Subject: Failing to get an answer,can it be done?


Hi,

Is it possible to set the src URL of an input image tag in the action form?
For example, how can I assign a URL dynamically to the src attribute of an
input tag of type image?







Thanks

-
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: How to click on a button to link to a page?

2003-09-05 Thread Aleksandr Shneyderman
> button, user will be directed to "sample.jsp". If I
> want to retrieve user selected item stored in an
> action Form, will I be able to get it once I am
> directed to sample.jsp using your code below? (Sorry,

When you say "will I be able to get it", what do you mean? 

On your sample.jsp do you have the same form as on your original 
page? Or do you just need the value of select box item on the 
sample.jsp? If latter is the case you would have to attach the 
value to request context.

something like:
 request.setAttribute ("selectboxvalue", selBoxValue);

If first case is your case you would just need to declare name attribute 
in your action mapping element of struts-config.xml.

Alex.

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



RE: closing tag for html tags...

2003-09-05 Thread Mark Galbreath
The simple truth is, is that we were all drunk, drinking beer and eating
crabs that night we put all this shit up on the whiteboard and had such a
bad hangover the next morning that we decided just to include it into the
spec and deal with it later, man.

Oh, my head still hurts from that night

Mark

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 3:08 PM
To: [EMAIL PROTECTED]
Subject: closing tag for html tags...



I was wondering why Struts doesn't put closing tags on the html generated.

Like 

Generates




Where is the /> or  ? Is there a reason for not generating this ?



Thanks

-- pady
[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: Design Question - Need to put assertions in Actions?

2003-09-05 Thread Marco Tedone
Message-ID:
<[EMAIL PROTECTED]>
From: "White, Joshua A (HTSC, CASD)" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Design Question - Need to put assertions in Actions?
Date: Fri, 5 Sep 2003 08:53:49 -0400
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"

 Say I have a form "formFoo" which manages some noun "Foo".  It has
two different actions, "newFoo" and "editFoo".  Each has specific logic
depending on whether or not Foo exists.  I am experiencing a problem where
users create Foo, but then (either by bookmark or the back button) users are
returning to the "newFoo" action and edit Foo using the "new" action instead
of the "edit" action.

What about to create a custom tag which, if the newfoo already exists,
simply redirect the user to the editfoo form? In any case, take in account
that the 'Back' button issue is a known problem among web applications, and
that users should be aware of it.

My 2 cents,

Marco


I have looked into the transaction token to eliminate the double submit
problem, but I have not found a solution to this problem.  So far, I have
placed some assertions in the "newFoo" action which validates that foo does
not already exist.  If it does exist, it forwards control to "editFoo".

This brings about the design question.  Putting this kind of
assertion/redirection logic in each action class gets messy fast and makes
each action class more of a controller than an action class.  (Which is not
where I want to go)

Any suggestions on how to handle this type of problem?

Regards,

Joshua




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



RE: How to click on a button to link to a page?

2003-09-05 Thread Rick Col
Thanks,

Yes, that's what I did. My question is: if I have a
"go" button on my "original.jsp" page, where there is
a drop down box user needs to select. After user
clicks on "go"
button, user will be directed to "sample.jsp". If I
want to retrieve user selected item stored in an
action Form, will I be able to get it once I am
directed to sample.jsp using your code below? (Sorry,
I probably need to test it, but I have not defined all
other stuff).

regards 


--- Aleksandr Shneyderman <[EMAIL PROTECTED]>
wrote:
> you would need to create a mapping the for the
> sample.jsp suppose you call
> it sample
> 
> in the action that will be processing your request
> when you ready to
> redirect to sample.jsp just state
> return mapping.findForward ("sample");
> 
> Unless I misunderstood again, but this is just a
> regular way to do the
> redirection to the view component in struts.
> 
> HTH
> 
> > -Original Message-
> > From: Rick Col [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 05, 2003 3:23 PM
> > To: Struts Users Mailing List
> > Subject: RE: How to click on a button to link to a
> page?
> >
> >
> > Thanks,
> >
> > Sorry, I did not make it clear. I actually need to
> > retrieve form data after I click go button. So,
> > basically, it has to go to action path specified
> in
> > struts-config.xml after clicking on the button.
> >
> > Can I simply replace "sample.jsp" with action path
> > specified in struts-config.xml in your code?
> >
> > regards,
> >
> >
> >
> > --- Aleksandr Shneyderman <[EMAIL PROTECTED]>
> > wrote:
> > >  > > onclick="document.location=' > > page="sample.jsp" />'">
> > >
> > > > -Original Message-
> > > > From: Rick Col [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, September 05, 2003 2:43 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: How to click on a button to link to a
> > > page?
> > > >
> > > >
> > > > Hi,
> > > >
> > > > If I have a go button like this:
> > > >
> > > >  > > > key="button.go"/>
> > > >
> > > > once I click on this button, I want it to go
> to
> > > > another jsp page sample.jsp. How can I do
> that? Is
> > > it
> > > > possible to use  to do the job?
> > > >
> > > > regards,
> > > >
> > > >
> > > >
> > > > __
> > > > Do you Yahoo!?
> > > > Yahoo! SiteBuilder - Free, easy-to-use web
> site
> > > design software
> > > > http://sitebuilder.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]
> > >
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: closing tag for html tags...

2003-09-05 Thread David Graham
Place  at the top of your page.

David

--- Pady Srinivasan <[EMAIL PROTECTED]> wrote:
> 
> I was wondering why Struts doesn't put closing tags on the html
> generated.
> 
> Like 
> 
> Generates
> 
> 
> 
> 
> Where is the /> or  ? Is there a reason for not generating this
> ?
> 
> 
> 
> Thanks
>  
> -- pady
> [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: Upload Problem

2003-09-05 Thread Robert Leland
Lilian Maria Ramos Lima wrote:

Hi,

We are using the Struts Upload support in our application, and it's working
in our development and test enviromnent, but not in our production
enviromnent.  The exception is very strange and ambigous :
java.io.IOException: The operation completed successfully.
I have looked for permissions problems in the file system that could be
affecting the temp file creation , but i did not find anything suspiciuos. 

The operational system is MS Windows in all of my enviroments.
Struts version: 1.1b3
 

First off upgrade to Struts 1.1. Build your system with the new jar.
If Weblogic 8.1 is 1.2/2.3 then delete all unnneded *.tld since these 
will be
fetched from the stryts.jar itself. Also update all other files like 
validator-rules.xml.

By default Struts 1.1  it uses the commons-fileupload which is
much faster that the 1.1b3 version, fewer bugs, and supported.
I do agree the error message

java.io.IOException: The operation completed successfully

is very strange. 

So try the upgrade and lets go from there.




Application server  : Weblogic 8.1 SP1

Please, any help will be welcome.

java.io.IOException: The operation completed successfully
at
java.io.Win32FileSystem.createFileExclusively(Ljava.lang.String;)Z(Native
Method)
at
java.io.File.checkAndCreate(Ljava.lang.String;Ljava.lang.SecurityManager;)Z(
Unknown Source)
at
java.io.File.createTempFile(Ljava.lang.String;Ljava.lang.String;Ljava.io.Fil
e;)Ljava.io.File;(Unknown Source)
at
org.apache.struts.upload.MultipartIterator.createLocalFile()Ljava.io.File;(M
ultipartIterator.java:443)
at
org.apache.struts.upload.MultipartIterator.createFileMultipartElement()Lorg.
apache.struts.upload.MultipartElement;(MultipartIterator.java:350)
at
org.apache.struts.upload.MultipartIterator.getNextElement()Lorg.apache.strut
s.upload.MultipartElement;(MultipartIterator.java:291)
at
com.mercador.eproc.app.webedi.ImportDocumentAction.perform(Lorg.apache.strut
s.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.h
ttp.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lcom.mercador
.core.ejb.BaseUserBean;)Lorg.apache.struts.action.ActionForward;(ImportDocum
entAction.java:115)
 



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


RE: How to click on a button to link to a page?

2003-09-05 Thread Aleksandr Shneyderman
you would need to create a mapping the for the sample.jsp suppose you call
it sample

in the action that will be processing your request when you ready to
redirect to sample.jsp just state
return mapping.findForward ("sample");

Unless I misunderstood again, but this is just a regular way to do the
redirection to the view component in struts.

HTH

> -Original Message-
> From: Rick Col [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 3:23 PM
> To: Struts Users Mailing List
> Subject: RE: How to click on a button to link to a page?
>
>
> Thanks,
>
> Sorry, I did not make it clear. I actually need to
> retrieve form data after I click go button. So,
> basically, it has to go to action path specified in
> struts-config.xml after clicking on the button.
>
> Can I simply replace "sample.jsp" with action path
> specified in struts-config.xml in your code?
>
> regards,
>
>
>
> --- Aleksandr Shneyderman <[EMAIL PROTECTED]>
> wrote:
> >  > onclick="document.location=' > page="sample.jsp" />'">
> >
> > > -Original Message-
> > > From: Rick Col [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, September 05, 2003 2:43 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: How to click on a button to link to a
> > page?
> > >
> > >
> > > Hi,
> > >
> > > If I have a go button like this:
> > >
> > >  > > key="button.go"/>
> > >
> > > once I click on this button, I want it to go to
> > > another jsp page sample.jsp. How can I do that? Is
> > it
> > > possible to use  to do the job?
> > >
> > > regards,
> > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > http://sitebuilder.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]
> >
>
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.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]



closing tag for html tags...

2003-09-05 Thread Pady Srinivasan

I was wondering why Struts doesn't put closing tags on the html generated.

Like 

Generates




Where is the /> or  ? Is there a reason for not generating this ?



Thanks
 
-- pady
[EMAIL PROTECTED]
 


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



RE: Failing to get an answer,can it be done?

2003-09-05 Thread Das, Amar


Thanks. But it is not working.
In my form bean (MapForm) I am setting the following variable
public class MapForm extends ActionForm {

  /* Map Source*/
  private String
mapSource="http://geo.tpmc.com/output/dqs_GEO2056217212.jpg";;
  .
  
  public MapForm(){
try {

mapSource = map.getMapOutput().getURL();
.

Then on my jsp page I am using the following


Any suggestion?

-Original Message-
From: Mike Jasnowski [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 3:16 PM
To: Struts Users Mailing List
Subject: RE: Failing to get an answer,can it be done?

Sure, 



or wi html-el

mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 2:24 PM
To: [EMAIL PROTECTED]
Subject: Failing to get an answer,can it be done?


Hi,

Is it possible to set the src URL of an input image tag in the action form?
For example, how can I assign a URL dynamically to the src attribute of an
input tag of type image?







Thanks

-
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: How to click on a button to link to a page?

2003-09-05 Thread Rick Col
Thanks,

Sorry, I did not make it clear. I actually need to
retrieve form data after I click go button. So,
basically, it has to go to action path specified in
struts-config.xml after clicking on the button. 

Can I simply replace "sample.jsp" with action path
specified in struts-config.xml in your code?

regards,



--- Aleksandr Shneyderman <[EMAIL PROTECTED]>
wrote:
>  onclick="document.location=' page="sample.jsp" />'">
> 
> > -Original Message-
> > From: Rick Col [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 05, 2003 2:43 PM
> > To: [EMAIL PROTECTED]
> > Subject: How to click on a button to link to a
> page?
> >
> >
> > Hi,
> >
> > If I have a go button like this:
> >
> >  > key="button.go"/>
> >
> > once I click on this button, I want it to go to
> > another jsp page sample.jsp. How can I do that? Is
> it
> > possible to use  to do the job?
> >
> > regards,
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.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]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Avoid Validate After Submit

2003-09-05 Thread Kurt Post
Here's how I do it in Struts 1.1.  I'm not sure how 1.1 is different from
1.01 in the validation area so your mileage may very.

First I have a base class for all my ActionForm's called ExtendedActionBase.
Among other things, this class defines some standard button name for "next",
"back", "cancel", and "OK" verbs.  The class will only perform validation if
a "next" or "OK" button was used to submit the form.  There's also some
extra junk in the class that has to do with accepting either simple  buttons.

The only other thing you need to do is on "back" and "cancel" buttons make
sure they are  buttons.  This insures that the JavaScript
validator will not validate the form.

I'll include ExtendedActionBase.java below.

Hope this helps,

Kurt

 ---
/*
 * ExtendedActionForm.java
 *
 * Created on July 11, 2003, 10:39 AM
 */

package com.kaptec.dateweb.web.struts.actionforms;

import org.apache.struts.action.ActionErrors;

/** The purpose of this class is to provide a base class for ActionForms
that want
 * to prepopulate their values when they are created.  This class takes
advantage
 * of the fact that STruts calls Reset() when an ActionForm is created and
in
 * addition to calling Reset() before populating ActionForm properties from
 * submitted HTML form data.
 *
 * Descenden ts of this class need to implement two methods.  the
onInitialize()
 * method is called when the ActionForm is created and the onProcessForm()
method
 * is called before HTML form values are passed into ActionForm properties.
 * @author Kurt Post
 */
public class ExtendedActionForm extends
org.apache.struts.validator.ValidatorActionForm {

/** indicates if the ActionForm has been initialed yet */
private boolean isInitialized = false;

/** This attribute will be set to a non-null value if the user pressed
the "Submit" button on
 * the form.
 */
private String btnProcessForm;
/** This attribute will be set to a non-null value if the user pressed
the "Cancel" button on
 * the form.
 */
private String btnCancelForm;
/** This attribute will be set to a non-null value if the user pressed
the "Next" button on
 * the form.
 */
private String btnNext;
/** This attribute will be set to a non-null value if the user pressed
the "Back" button on
 * the form.
 */
private String btnBack;
/** The X and Y attributes of this object will be set if the user clicks
on a
 * "Submit" image button
 */
private ImageButtonCoordinates imgProcessForm = new
ImageButtonCoordinates();
/** The X and Y attributes of this object will be set if the user clicks
on a
 * "Submit" image button
 */
private ImageButtonCoordinates imgCancelForm = new
ImageButtonCoordinates();
/** The X and Y attributes of this object will be set if the user clicks
on a
 * "Next" image button
 */
private ImageButtonCoordinates imgNext = new ImageButtonCoordinates();
/** The X and Y attributes of this object will be set if the user clicks
on a
 * "Back" image button
 */
private ImageButtonCoordinates imgBack = new ImageButtonCoordinates();

/** Simply catch the Struts framework calles to reset() and forward it
to
 * onInitialize() or onProcessForm().
 * @param mapping Action mapping that caused our ActionForm to be
 * created or populated
 * @param request HTTP request which caused this ActionForm to be
 * created or populated.
 */
public void reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request) {
super.reset(mapping, request);
if (isInitialized == false) {
onInitialize(mapping, request);
isInitialized = true;
} else {
onProcessForm(mapping, request);
}
}

/** Override this method to handle ActionForm initialization
 * WARNING: The method in this base class should be called by descendent
 *  classesthat override it since it handles resetting form
 *  submit/cancel related properties.
 * @param mapping Action mapping that caused our ActionForm to be
 * created
 * @param request HTTP request which caused this ActionForm to be
 * created
 */
public void onInitialize(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request) {
}

/** Override this method to handle any processing needed before HTML
form data is
 * passed to the properties of this ActionForm
 * WARNING: The method in this base class should be called by descendent
 *  classesthat override it since it handles resetting form
 *  submit/cancel related properties.
 * @param mapping Action mapping that caused our ActionForm to be
 * populated
 * @param request HTTP request which caused this ActionForm to be
 * populated.
 */
public void onProcessForm(org.apache.struts.action.ActionMapping
map

RE: Combining struts and JSTL tags...

2003-09-05 Thread Siggelkow, Bill
Basically, any of the struts tags that are "struts-aware" were not eliminated from 
Struts-EL -- specifically, the bean:message tag was not eliminated because it 
specifically looks in the application resources as specified in struts-config.  The 
 can be made to look into that bundle but it
does not by default the way the  tag does.  You might want to take a 
look at the 
my presentation http://www.jadecove.com/articles/jstl-and-struts.pdf to the Atlanta 
Struts User Group.

In addition, be sure and read the readme file in the contrib/struts-el folder.

-Original Message-
From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 2:08 PM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...


fmt:message

> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 1:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Combining struts and JSTL tags...
> 
> 
> > > I am using the "html" library from struts, otherwise use JSTL 
> > > libraries for my other requirements. I was curious if anybody 
> > > uses both these tag libraries together ? If so, which ones do 
> > > you use from which library and why ? Also, is there any 
> > > document/article comparing the 2 tag libraries ?  
> > 
> > The Struts web site recommends that you use JSTL instead of 
> > the bean and logic taglibs.
> 
> I don't think there's an equivalent of the bean:message
> tag in JSTL, if you want to continue using the
> MessageResources mechanism.
> 
> So it's JSTL instead of bean and logic, except for
> bean:message?
> 
>   -TPP
> 
> -
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> -
> 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: How to click on a button to link to a page?

2003-09-05 Thread Aleksandr Shneyderman
'">

> -Original Message-
> From: Rick Col [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 2:43 PM
> To: [EMAIL PROTECTED]
> Subject: How to click on a button to link to a page?
>
>
> Hi,
>
> If I have a go button like this:
>
>  key="button.go"/>
>
> once I click on this button, I want it to go to
> another jsp page sample.jsp. How can I do that? Is it
> possible to use  to do the job?
>
> regards,
>
>
>
> __
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.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]



setting caching true from struts-config

2003-09-05 Thread Anand M S
Hi All,
 I need to set the cache = true for all my pages using struts-config, how 
can we do this? any ideas?

Thanks,
Anand
_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

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


RE: how to start a background process using a struts action ?

2003-09-05 Thread Steve Hall
José,

This is really a system design question rather than a Struts
specific question so I've add the [OT] to the subject.  I've seen an
implementation similar to what you're asking about.  I'm not sure if what I
can contribute will help you with your situation.  
Something to keep in mind is that you want to encapsulate the
different layers of your system from each other as much as possible.  You
want to use Struts to collect data and pass it to the lower layers of your
system for processing, then return the results to the user.  You wouldn't
want a Struts Action class doing business logic or Thread control etc.
[stepping off of the soap box]

Here's what you could do:

Process Definitions:  Create a DB table, xml doc, properties file, whatever
that contains a definition of all the processes you'll need to running.  If
these are Java classes, this data could contain the fully qualified class
name.

Process Request Queue:  Create a DB table, JMS queue or some other
persistence mechanism to queue up you process requests.

Front End:  Create your Struts front end to capture the request data and
persist it to your Process Request Queue.  

Daemon: Write a daemon class that polls your Process Request Queue and runs
the requested process.  You can get as fancy with this as you want, you
could: multi-thread it, use a Strategy Pattern (GOF) to allow it to run
different process types, integrate email as an output distribution
mechanism, etc.  All the daemon really needs to know how to do is poll your
Request Queue and when it sees a Request, run the appropriate process based
on the Process Definition.  Obviously, each Request must have an ID back to
a Process Definition along with any parameters that the process requires.
You'd run this daemon in a separate JVM, not in Tomcat's.  For performance
reasons, you may even run it on a different server than the one running
Tomcat.  If you executed your process in your Struts class you wouldn't have
this option.

I hope this  at least gives you something to think about.

Steve Hall 
Programmer Analyst 
Alterra Healthcare 
(414) 918 5636 
[EMAIL PROTECTED] 





-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:11 PM
To: 'Struts Users Mailing List'
Subject: how to start a background process using a struts action ?


Hi Folks !

Does anyone here know if is possible to start a background
process ( like a daemon/service) using an action ? I need this feature
because the user will input a few parameters and a schedule date then
the system generate the user specific information.

Im using struts 1.1 and Toncat 4.1.18, so any tips on how can I
accomplish this task ?

Regards !

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This email may contain confidential protected health information.  This
information is intended only for the use of the individual or entity to
which it is addressed.  The authorized recipient of this information is
prohibited from disclosing this information to any other party unless
required to do so by law or regulation and is required to destroy the
information after its stated need has been fulfilled.  If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or action taken in reliance on the contents of this email is
STRICTLY PROHIBITED.  If you have received this email in error, please
notify the sender immediately and arrange for the return or destruction of
the contents of this email.  If you continue to receive emails from this
sender, please contact Alterra's Family Connection Hotline at 877-400-5296.

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



How to click on a button to link to a page?

2003-09-05 Thread Rick Col
Hi,

If I have a go button like this:



once I click on this button, I want it to go to
another jsp page sample.jsp. How can I do that? Is it
possible to use  to do the job?

regards,



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Syntax for accessing an object nested in a List of Lists [SOLVED]

2003-09-05 Thread Jason Lea
Did you try list[index][index].property?

It is too late for me to test (1:34am - going to bed)

Robert Taylor wrote:
Okay. After looking at PropertyUtils I determined that this sort of syntax
is not allowed when accessing an object from an ArrayList of ArrayLists.
You have to wrap the child lists in an object which provides some type of
accessor/mutator. So in my case I have an ArrayList of ListWrapper objects.
Where each ListWrapper contains a List and getList()/setList(). Then the
syntax below
works - assuming my form bean has the methods getList()/setList().
list[index].list[index].property

Kind of a PIA to have to wrap the nested lists. Seems like PropertyUtils
would contain logic to recognize this use case but as I look at the source
code for getIndexedProperty, the necessary modifications would be none
trivial.
robert


-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 5:15 PM
To: [EMAIL PROTECTED]
Subject: Syntax for accessing an object nested in a List of Lists
I've run into some trouble accessing a nested object in my form.
The object "lives" in a List of Lists type of structure.
I've been using a syntax like the following assuming my List form
property is named 'list'.
list[index].[index].productId

This must be wrong because I get the following exception:

No getter method available for property list[0].[0].productId for
bean under
name org.apache.struts.taglib.html.BEAN'
I tried the following just to make sure it could find the 'first level'.

list[index]

This doesn't cause any exceptions, so I must have the syntax
wrong for accessing the 'second level' of the structure.
Any help would be appreciated?

robert







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



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


Upload Problem

2003-09-05 Thread Lilian Maria Ramos Lima
Hi,

We are using the Struts Upload support in our application, and it's working
in our development and test enviromnent, but not in our production
enviromnent.  The exception is very strange and ambigous :
java.io.IOException: The operation completed successfully.
I have looked for permissions problems in the file system that could be
affecting the temp file creation , but i did not find anything suspiciuos. 

The operational system is MS Windows in all of my enviroments.
Struts version: 1.1b3
Application server  : Weblogic 8.1 SP1

Please, any help will be welcome.


java.io.IOException: The operation completed successfully
at
java.io.Win32FileSystem.createFileExclusively(Ljava.lang.String;)Z(Native
Method)
at
java.io.File.checkAndCreate(Ljava.lang.String;Ljava.lang.SecurityManager;)Z(
Unknown Source)
at
java.io.File.createTempFile(Ljava.lang.String;Ljava.lang.String;Ljava.io.Fil
e;)Ljava.io.File;(Unknown Source)
at
org.apache.struts.upload.MultipartIterator.createLocalFile()Ljava.io.File;(M
ultipartIterator.java:443)
at
org.apache.struts.upload.MultipartIterator.createFileMultipartElement()Lorg.
apache.struts.upload.MultipartElement;(MultipartIterator.java:350)
at
org.apache.struts.upload.MultipartIterator.getNextElement()Lorg.apache.strut
s.upload.MultipartElement;(MultipartIterator.java:291)
at
com.mercador.eproc.app.webedi.ImportDocumentAction.perform(Lorg.apache.strut
s.action.ActionMapping;Lorg.apache.struts.action.ActionForm;Ljavax.servlet.h
ttp.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Lcom.mercador
.core.ejb.BaseUserBean;)Lorg.apache.struts.action.ActionForward;(ImportDocum
entAction.java:115)


Thanks in advance,


Lílian Lima
Analista de Sistemas
Mercador  SA  - Grupo Telefonica
R. Dona Laura, 320 - 7o andar
Porto Alegre - RS
fone:55-51-33789007
[EMAIL PROTECTED]
http://www.mercador.com.br


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



RE: Failing to get an answer,can it be done?

2003-09-05 Thread Mike Jasnowski
Sure, 



or wi html-el

mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 2:24 PM
To: [EMAIL PROTECTED]
Subject: Failing to get an answer,can it be done?


Hi,

Is it possible to set the src URL of an input image tag in the action form?
For example, how can I assign a URL dynamically to the src attribute of an
input tag of type image?







Thanks

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



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



RE: how to start a background process using a struts action ?

2003-09-05 Thread Mike Jasnowski
Well, fancy scheduling API's aside, the action could launch a process via
the JDK's Runtime.exec() method. You can pass that parms and properties.

-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:11 PM
To: 'Struts Users Mailing List'
Subject: how to start a background process using a struts action ?


Hi Folks !

Does anyone here know if is possible to start a background
process ( like a daemon/service) using an action ? I need this feature
because the user will input a few parameters and a schedule date then
the system generate the user specific information.

Im using struts 1.1 and Toncat 4.1.18, so any tips on how can I
accomplish this task ?

Regards !

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[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: Combining struts and JSTL tags...

2003-09-05 Thread Pady Srinivasan

That was the answer I was looking for.


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...

> I am using the "html" library from struts, otherwise use JSTL 
> libraries for my other requirements. I was curious if anybody 
> uses both these tag libraries together ? If so, which ones do 
> you use from which library and why ? Also, is there any 
> document/article comparing the 2 tag libraries ?  

The Struts web site recommends that you use JSTL instead of the bean and
logic taglibs. IMHO, all you need is JSTL and the html-el library, and you
can do anything that needs doing in a JSP page.

--
Tim Slattery
[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: issue with the multi select

2003-09-05 Thread Mathew, Manoj
I tried it and still form is not retaining the value

this is the select i declared in my jsp





there were another issue in the function which map the fields to the form

till date my dynaaction form were using just String.
so i got away with 
DynaClass dynaClass = form.getDynaClass();
DynaProperty[] props = dynaClass.getDynaProperties();
for (int i = 0; i < props.length; i++) {
Object propertyNameObj = props[i].getName();
String fieldValue = (String) form.get(propertyNameObj.toString()); 

But when i used string[] this was throwing ClassCast exception. and i couldn't find 
anyway to check if form.get(propertyNameObj.toString()) return a String or 
String[]..So i just put (String) form.get(propertyNameObj.toString()); in  a try/Catch 
block and in the catch block i checked for Classcast Exception and then i did
 String[] temp=(String[]) form.get(propertyNameObj.toString());.Assuming the 
classcast exception is thrown just because form.get(propertyNameObj.toString() 
returned a String Array..Bad  Programming..but couldn't find any other way to do 
that.)


Still i have issues..ie my Form is not retaining the multiselect box value..ie when 
any action in the same form post the form and comes back to the same page, i loose the 
data in the multi select box. i tried by selecting the values in the multi select 
box..but still not working...any ideas..?

thank you
manoj










-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 9:06 AM
To: Struts Users Mailing List
Subject: RE: issue with the multi select


You need to submit the changes in the field contents to the server. I
presume when you talk about the form being 'refreshed' you actually mean
that it POSTs to some action which does some stuff and then you get
forwarded back to the same jsp again?

The web browser will only submit the values for the _selected_ items in the
respective  fields. As far as the browser is concerned there are two
seperate select fields, and the values that are selected are only the ones
that are highlighted! (We know of course that its conceptually one field
with one box being unselected stuff and the other box the selected stuff,
but the browser isnt so smart)

What you need therefore is to ensure that the values are selected
(highlighted) at submit time.
This will involve some fancy javascript coding to go and set the 'selected'
property on all the option elements in both boxes when the form is
submitted.

(Before going ahead and spending time writing javascript to do this you will
probably want to confirm that this actually is the issue by manually
highlighting all the values in both boxes in your page, and invoking the
submit. See how it gets handled and what gets submitted in the request)


I HAVE DECLARED 2 STRINGS FOR THESE 2 SELECT BOXES


Surely you mean a string array ( String[] ) for each of the 2 fields as they
will both be submitting multiple values?

-Original Message-
From: Mathew, Manoj [mailto:[EMAIL PROTECTED]
Sent: Thursday, 4 September 2003 21:43
To: Struts Users Mailing List
Subject: issue with the multi select


Hi all

  I have 2 multi select box( wth size 5)  and have  "ADD" and :remove"
button in a dyna action form. Basically you can select one or more from a
select box and add it to the second one using ADD buton adn remove the
selected using "REMOVE" button. I have some other actions also in the same
page.

issue:

   Add and REmove are working(in java script). but when he entire form is
refreched( when some other actions are executed), the select box is not
retaining the value.So basically "ADD" and"REMOVE" is not updating the form
values. I checked the valuew of the select boxes when the form is posted.
The values are not correct. ie it is not retaing my "ADD" and "REMOVE"
values..

IN STRUCTS_CONFIG, I HAVE DECLARED 2 STRINGS FOR THESE 2 SELECT BOXES

ADD
function add(value,to)
{ 
var newoption= new Option(value,value);
document.forms[0].s2.options[document.forms[0].s2.length]=newoption;

}
function remove(from) { 
for (var i=(from.options.length-1); i>=0; i--) { 
var o=from.options[i]; 
if (o.selected) { 
from.options[i] = null; 
   
} 
} 
from.selectedIndex = -1; 
} 

thank you
manoj

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



issue with the multi select

2003-09-05 Thread Mathew, Manoj
I tried it and still form is not retaining the value

this is the select i declared in my jsp





there were another issue in the function which map the fields to the form

till date my dynaaction form were using just String.
so i got away with 
DynaClass dynaClass = form.getDynaClass();
DynaProperty[] props = dynaClass.getDynaProperties();
for (int i = 0; i < props.length; i++) {
Object propertyNameObj = props[i].getName();
String fieldValue = (String) form.get(propertyNameObj.toString()); 

But when i used string[] this was throwing ClassCast exception. and i couldn't find 
anyway to check if form.get(propertyNameObj.toString()) return a String or 
String[]..So i just put (String) form.get(propertyNameObj.toString()); in  a try/Catch 
block and in the catch block i checked for Classcast Exception and then i did
 String[] temp=(String[]) form.get(propertyNameObj.toString());.Assuming the 
classcast exception is thrown just because form.get(propertyNameObj.toString() 
returned a String Array..Bad  Programming..but couldn't find any other way to do 
that.)


Still i have issues..ie my Form is not retaining the multiselect box value..ie when 
any action in the same form post the form and comes back to the same page, i loose the 
data in the multi select box. i tried by selecting the values in the multi select 
box..but still not working...any ideas..?

thank you
manoj


Thank you

Mathew Manoj
Group Information Systems (H243)
* (515)362-0539
* mailto:[EMAIL PROTECTED]



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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Paananen, Tero
> > fmt:message
> 
> It does not use MessageResources, from what I can gather.
> Or does it?

Never mind, found the way to do that:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg49508.html

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Failing to get an answer,can it be done?

2003-09-05 Thread Das, Amar
Hi,

Is it possible to set the src URL of an input image tag in the action form?
For example, how can I assign a URL dynamically to the src attribute of an
input tag of type image?







Thanks

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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Paananen, Tero
> fmt:message

It does not use MessageResources, from what I can gather.
Or does it?

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Pady Srinivasan

I thought so. Although Google didn't return any thing. I will look in the
Struts archives. 

Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Chen, Gin [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 1:58 PM
To: 'Struts Users Mailing List'
Subject: RE: Combining struts and JSTL tags...

pady this has been discussed many many times before in this list.
please search the archives.

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: Combining struts and JSTL tags...




I am using the "html" library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?  



Thanks
 
-- pady
[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]



how to start a background process using a struts action ?

2003-09-05 Thread José Gustavo Zagato
Hi Folks !

Does anyone here know if is possible to start a background
process ( like a daemon/service) using an action ? I need this feature
because the user will input a few parameters and a schedule date then
the system generate the user specific information.

Im using struts 1.1 and Toncat 4.1.18, so any tips on how can I
accomplish this task ?

Regards !

  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]




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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Jarnot Voytek Contr AU HQ/SC
fmt:message

> -Original Message-
> From: Paananen, Tero [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 1:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Combining struts and JSTL tags...
> 
> 
> > > I am using the "html" library from struts, otherwise use JSTL 
> > > libraries for my other requirements. I was curious if anybody 
> > > uses both these tag libraries together ? If so, which ones do 
> > > you use from which library and why ? Also, is there any 
> > > document/article comparing the 2 tag libraries ?  
> > 
> > The Struts web site recommends that you use JSTL instead of 
> > the bean and logic taglibs.
> 
> I don't think there's an equivalent of the bean:message
> tag in JSTL, if you want to continue using the
> MessageResources mechanism.
> 
> So it's JSTL instead of bean and logic, except for
> bean:message?
> 
>   -TPP
> 
> -
> This email may contain confidential and privileged material 
> for the sole use of the intended recipient(s). Any review, 
> use, retention, distribution or disclosure by others is 
> strictly prohibited. If you are not the intended recipient 
> (or authorized to receive for the recipient), please contact 
> the sender by reply email and delete all copies of this 
> message.  Also, email is susceptible to data corruption, 
> interception, tampering, unauthorized amendment and viruses. 
> We only send and receive emails on the basis that we are not 
> liable for any such corruption, interception, tampering, 
> amendment or viruses or any consequence thereof.
> 
> 
> -
> 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: Combining struts and JSTL tags...

2003-09-05 Thread Paananen, Tero
> > I am using the "html" library from struts, otherwise use JSTL 
> > libraries for my other requirements. I was curious if anybody 
> > uses both these tag libraries together ? If so, which ones do 
> > you use from which library and why ? Also, is there any 
> > document/article comparing the 2 tag libraries ?  
> 
> The Struts web site recommends that you use JSTL instead of 
> the bean and logic taglibs.

I don't think there's an equivalent of the bean:message
tag in JSTL, if you want to continue using the
MessageResources mechanism.

So it's JSTL instead of bean and logic, except for
bean:message?

-TPP

-
This email may contain confidential and privileged material for the sole use of the 
intended recipient(s). Any review, use, retention, distribution or disclosure by 
others is strictly prohibited. If you are not the intended recipient (or authorized to 
receive for the recipient), please contact the sender by reply email and delete all 
copies of this message.  Also, email is susceptible to data corruption, interception, 
tampering, unauthorized amendment and viruses. We only send and receive emails on the 
basis that we are not liable for any such corruption, interception, tampering, 
amendment or viruses or any consequence thereof.


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



Re: Struts performance tips???

2003-09-05 Thread David Graham
--- Pete Serafin <[EMAIL PROTECTED]> wrote:
> All,
> 
> 
> I have a Struts1.1.3 based application running on Jrun4 and Iplanet
> Enterprise 5 servers. I was wondering if there were any guidelines,
> faq's, or help in any of the Struts books on how to improve application
> performance.  Any help is appreciated.

There is no Struts 1.1.3.  Your choices are 1.0, 1.0.1, 1.0.2, or 1.1 :-).
The quality of your JSP compiler is very important to the page rendering
times.  Struts is not the bottleneck in database driven webapps, the
database is.

David

> 
> 
> Pete Serafin
> HealthCare Recruiters International
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Slattery, Tim - BLS
> I am using the "html" library from struts, otherwise use JSTL 
> libraries for my other requirements. I was curious if anybody 
> uses both these tag libraries together ? If so, which ones do 
> you use from which library and why ? Also, is there any 
> document/article comparing the 2 tag libraries ?  

The Struts web site recommends that you use JSTL instead of the bean and
logic taglibs. IMHO, all you need is JSTL and the html-el library, and you
can do anything that needs doing in a JSP page.

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: Combining struts and JSTL tags...

2003-09-05 Thread Chen, Gin
pady this has been discussed many many times before in this list.
please search the archives.

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: Combining struts and JSTL tags...




I am using the "html" library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?  



Thanks
 
-- pady
[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: Combining struts and JSTL tags...

2003-09-05 Thread Siggelkow, Bill
Pady -- generally, there is very little overlap between JSTL and the Struts HTML tags.
There are no JSTL tags that do the work that the Struts html tags do ... that being 
said, I 
encourage you to use the html-el library (basically the Struts html tags which support 
EL)
so you have the full power of EL for the HTML tags as well as the JSTL tags.

Good Luck!

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: Combining struts and JSTL tags...




I am using the "html" library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?  



Thanks
 
-- pady
[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]



Combining struts and JSTL tags...

2003-09-05 Thread Pady Srinivasan


I am using the "html" library from struts, otherwise use JSTL libraries for
my other requirements. I was curious if anybody uses both these tag
libraries together ? If so, which ones do you use from which library and why
? Also, is there any document/article comparing the 2 tag libraries ?  



Thanks
 
-- pady
[EMAIL PROTECTED]
 


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



RE: [OT] Character Encoding

2003-09-05 Thread Yann Lebreton
did you set the character encoding on the request before getting the data to the db ?
if you don't the input may be interpreted using the default JVM's encoding.

-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:53 AM
To: 'Struts Users Mailing List'
Subject: RE: [OT] Character Encoding


Hey Yann Lebreton !

I have the same doubt as you, but for time constraints we decide
to use the encode at the JSP.

I have some questions about Internationalizations and maybe you
/ someone else could give me a more clear perspective on this subject...

I' am developing a site wich must run under several languages,
including Chinese, Thay, and many many others. I build several small
applications to prove that the location / I18N works fine on struts for
showing messages at the HTML. But My current concern is those input text
fields... How Can I handle the user Input ? I will save all entered data
in a Oracle database (already prepared to work with Unicode), but during
testing every time that I save some data in Unicode format the Database
don't understand it.

Does anyone here have any hint on this stuff ?

Cheers !


  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]


-Original Message-
From: Yann Lebreton [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 13:46
To: [EMAIL PROTECTED]
Subject: [OT] Character Encoding

As part of localizing a site, I'm trying to set the content type of the
response. Now I now I can do this within the JSP (<%@ page
contentType="text/html; charset=UTF-8" %> ). 
But I'd rather do this globally. I found out that you can set this as a
parameter of the controller in struts. This would work fine if the JSP
compiler wasn't also setting the content type automatically.

So do someone know a container setting to do this ? Is there something
like a "pre-compiler" for JSP, that would change/add code to each JSP
before giving it to the JSP compiler ?

Thanks,
Yann



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


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



Struts performance tips???

2003-09-05 Thread Pete Serafin
All,


I have a Struts1.1.3 based application running on Jrun4 and Iplanet Enterprise 5 
servers. I was wondering if there were any guidelines, faq's, or help in any of the 
Struts books on how to improve application performance.  Any help is appreciated.


Pete Serafin
HealthCare Recruiters International


RE: Probelm with routing.

2003-09-05 Thread David Friedman
Dear Sreekant,

When I programmed my RequestProcessor a about 2 weeks ago, I found
processRoles() throws exceptions which are absolutely not catchable by any
Exceptions listings in struts-config.xml.  So, I wrote better Java code to
catch things like null pointers.  Or (pardon the thick sarcasm), you could
try/catch it yourself in your method.  The reference to my filter is:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg78455.html
I did one typo, in step #3 i wrote 'scope='
when it should be 'roles=.'.

I've never had one login-related exception (null pointer or otherwise) since
the day I wrote the above RequestProcessor class, which I have in place and
test under every day.  The hard part for me was figuring out how to redirect
to the page of my choice, which you'll find in my example code.

Regards,
David

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 5:47 AM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: RE: Probelm with  routing.



Basically what I wanted to do in the processPreprocess() method of
MyRequestProcessor class was "Check if there were any User related
credentials in the session, if yes let the process continute. If not then
throw the Logon page". Is there any otherway I can achieve this so that the
application developer doesn't have to take care of this in each and every
Action class that he/she writes.

Regards
Sreekant G
@ 98404-65630



  "Andrew Hill"
  <[EMAIL PROTECTED]To:   "Struts Users
Mailing List" <[EMAIL PROTECTED]>
  idnode.com>  cc:
   Subject:  RE: Probelm
with  routing.
  09/05/2003 02:27 PM
  Please respond to
  "Struts Users Mailing
  List"






Afaik, the global-exceptions only traps exceptions thrown up from your
actions (not from the RP or the JSPs)
(I could be wrong about this though!)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, 5 September 2003 16:50
To: [EMAIL PROTECTED]
Subject: Probelm with  routing.


I have written my own RequestProcessor class (MyRequestProcessor.java) by
extending the STRUTS provided RequesrProcessor class. I have overridden the
processPreprocess() method as below. Also I have defined the
java.lang.NullPointerException in the  of
struts-config.xml as shown below. But still I am getting
java.lang.NullPointerException instead of being routed to the index.jsp. Is
there anything that I am missing. Any clues please.

public boolean processPreprocess(HttpServletRequest request,
HttpServletResponse response)
{
  try
  {
System.out.println(" --- [MY REQUEST PROCESSOR
CLASS EXCEPTION TRY ] - ");
NullPointerException n = new NullPointerException();
throw n;
  }
  catch(Error e)
  {
System.out.println(" --- [MY REQUEST PROCESSOR
CLASS EXCEPTION CATCH ] - ");
  }
}


Made the below entries in struts-config.xml









The stack trace that I am getting on the screen:
java.lang.NullPointerException
 at
examples.MyRequestProcessor.processPreprocess(MyRequestProcessor.java:36)
 at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:237)


 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
 at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application

FilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh

ain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja

va:243)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5

66)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja

va:190

Regards
Sreekant G




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

RE: Validator cannot find message key

2003-09-05 Thread Yuan, Saul (TOR-ML)
Well, problem solved!!!

As a last resort, I updated all my jar files (struts.jar,
struts-validator.jar etc dated at 06/19/03) with the ones (dated at
06/29/03) from a fresh download of the Struts1.1 binary release. And
like a magic, the problem disappeared. 


Thank you all for the suggestions,

Saul




> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 11:16 AM
> To: Struts Users Mailing List
> Subject: Re: Validator cannot find message key
> 
> 
> 
> 
> 
> I see you're validating manually in the action. Have you tried doing
it
> automatically with validate=true in the mapping?
> 
> I'm not saying you have to do it like that, but it should work that
way.
>   You should specify the input attribute in the mapping as well.
> 
> 
> 
> On 09/05/2003 03:49 PM Yuan, Saul (TOR-ML) wrote:
> > Hi Adam,
> >
> > The problem happens to both client side (javascript) and serverside.
> > Below are the codes for each file:
> >
> > Struts-config.xml:
> >
> > 
> >  > type="com.mmi.ratt.emailmanager.message.form.MessageForm" />
> >
> > 
> >  > attribute="messageForm"
> > name="messageForm"
> > path="/createMessageAction"
> > scope="session"
> > validate="false"
> > type="com.mmi.ratt.emailmanager.message.action.CreateMessageAction">
> >  > path="/create_message_step2.jsp" />
> > 
> > 
> > 
> >
> >
> > 
> > 
> >
> >
> >
> > CreateMessageAction.java:
> >
> > // -- validate user input
> > ActionErrors errors = messageForm.validate(mapping,
> > request);
> >
> > if(errors != null)
> >  logger.debug("*** number of validation errors: "
> > + errors.size());
> > else
> >  logger.debug("*** number of validation errors:
> > none");
> >
> > if (errors != null && !errors.isEmpty()) {
> >  logger.debug("*** validation error saved");
> >
> >  saveErrors(request, errors);
> >  if (messageForm.getPage() == 1)
> >   return mapping.findForward("input" +
> > messageForm.getPage());
> >
> >  if (messageForm.getPage() == 2)
> >   return mapping.findForward("input" +
> > messageForm.getPage());
> > }
> > // --
> >
> >
> > MessageForm.java:
> >
> > public class MessageForm extends ValidatorForm implements
Serializable {
> >
> > ...
> >
> >
> >
> > BTW, I am able to see the messages when using ,
but
> > the validator just cannot find them, just says "null is required",
the
> > validator is validating the required fields though.
> >
> >
> >
> > Thanks,
> > Saul
> >
> >
> >>-Original Message-
> >>From: Adam Hardy [mailto:[EMAIL PROTECTED]
> >>Sent: Friday, September 05, 2003 4:14 AM
> >>To: Struts Users Mailing List
> >>Subject: Re: Validator cannot find message key
> >>
> >>
> >>
> >>
> >>
> >>Hi Saul,
> >>to try to narrow this down a little, is the problem javascript or
> >>server-side, or both?
> >>
> >>One thing it might be is where you specified your
> >>ApplicationResources.properties. It should be something like this in
> >>struts-config.xml :
> >>
> >>>> parameter="org.blacksail.ApplicationResources"
> >>
factory="org.apache.struts.util.PropertyMessageResourcesFactory"
> >> null="true"/>
> >>
> >>Perhaps it would help if we could see the relevant form-definition
in
> >>your struts-config as well.
> >>
> >>Adam
> >>
> >>
> >>
> >>On 09/04/2003 10:03 PM Yuan, Saul (TOR-ML) wrote:
> >>
> >>>Here is what's in the validation.xml file:
> >>>
> >>>
> >>>
> >>>
> >>>  >>>page="1">
> >>>   >>>resource="true"/>
> >>> 
> >>>  >>>page="1">
> >>>   >>>resource="true"/>
> >>> 
> >>>  >>>page="1">
> >>>   >>>resource="true"/>
> >>> 
> >>> ...
> >>>
> >>>
> >>>
> >>>and in the application resources file:
> >>>
> >>>newmessage.label.messageName=Message Name
> >>>newmessage.label.zone=Distribution Zone
> >>>newmessage.label.audience=Target Audience
> >>>   ...
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> -Original Message-
> From: Koni Roth [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 04, 2003 3:56 PM
> To: Struts Users Mailing List
> Subject: Re: Validator cannot find message key
> 
> 
> 
> 
> 
> Paste the faulty part of your validation.xml file maybe we can see
> >>>
> >>>some
> >>>
> >>>
> strange things. I had a similar problem and it was only an error
in
> writing...
> 
> Yuan, Saul (TOR-ML) wrote:
> 
> 
> >Hi,
> >
> >
> >
> >I am using Struts Validator for validating a multi page form,
some
> >>>
> >>>how
> >>>
> >>>
> >the Validator cannot find the messages defined in the application
> >resources. I got the validation error messages like: null is
> >>>
> >>>required.
> 

Installation problems on debian

2003-09-05 Thread Volker Cordes
Hi,

I'm using debian with Tomcat4. I copied all struts *.war-files into the
tomcat webapp-directory and they are listed in the manager. But running
the applications throws Exceptions like:
struts-example:
javax.servlet.ServletException: org/apache/jasper/runtime/JspException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:481)
root cause:
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
struts-blank:
java.lang.NullPointerException
at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521)
In the logs there is the following entry (generated at tomcat startup):
org.apache.commons.digester.Digester getParser
SCHWERWIEGEND: Digester.getParser:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission getClassLoader)
Thanks for any help,
Volker


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


RE: [OT] Character Encoding

2003-09-05 Thread José Gustavo Zagato
Hey Yann Lebreton !

I have the same doubt as you, but for time constraints we decide
to use the encode at the JSP.

I have some questions about Internationalizations and maybe you
/ someone else could give me a more clear perspective on this subject...

I' am developing a site wich must run under several languages,
including Chinese, Thay, and many many others. I build several small
applications to prove that the location / I18N works fine on struts for
showing messages at the HTML. But My current concern is those input text
fields... How Can I handle the user Input ? I will save all entered data
in a Oracle database (already prepared to work with Unicode), but during
testing every time that I save some data in Unicode format the Database
don't understand it.

Does anyone here have any hint on this stuff ?

Cheers !


  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]


-Original Message-
From: Yann Lebreton [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 13:46
To: [EMAIL PROTECTED]
Subject: [OT] Character Encoding

As part of localizing a site, I'm trying to set the content type of the
response. Now I now I can do this within the JSP (<%@ page
contentType="text/html; charset=UTF-8" %> ). 
But I'd rather do this globally. I found out that you can set this as a
parameter of the controller in struts. This would work fine if the JSP
compiler wasn't also setting the content type automatically.

So do someone know a container setting to do this ? Is there something
like a "pre-compiler" for JSP, that would change/add code to each JSP
before giving it to the JSP compiler ?

Thanks,
Yann



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



[OT] Character Encoding

2003-09-05 Thread Yann Lebreton
As part of localizing a site, I'm trying to set the content type of the response. Now 
I now I can do this within the JSP (<%@ page contentType="text/html; charset=UTF-8" %> 
). 
But I'd rather do this globally. I found out that you can set this as a parameter of 
the controller in struts. This would work fine if the JSP compiler wasn't also setting 
the content type automatically.

So do someone know a container setting to do this ? Is there something like a 
"pre-compiler" for JSP, that would change/add code to each JSP before giving it to the 
JSP compiler ?

Thanks,
Yann


RE: [FRIDAY] Some flash fun

2003-09-05 Thread Chen, Gin
I thought those were spiders

-Original Message-
From: Michael Ruppin [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:10 PM
To: Struts Users Mailing List
Subject: Re: [FRIDAY] Some flash fun


Distract him with some tasty ants.  Mmmm.  Ants.

Adam Hardy <[EMAIL PROTECTED]> wrote:I can hardly believe I
am saying this, but the aardvark keeps eating my 
pixie.

On 09/05/2003 05:28 PM Bradley Handy wrote:
> That was neat.
> 
> 
>>-Original Message-
>>From: Andrew Hill [mailto:[EMAIL PROTECTED]
>>Sent: Friday, September 05, 2003 10:21 AM
>>To: Struts
>>Subject: [FRIDAY] Some flash fun
>>
>>I just know Mark loves flash stuff ;-)
>>This should take your mind off dealing with validator quirks for a
> 
> while.
> 
>>(Sorry mate - couldnt find any lisp to go with it!)
>>
>>http://www.freshsensation.com/samorost.swf
>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


-
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: Reg: Dyna Form Validation - Filed match

2003-09-05 Thread Mike Kienenberger
Raj Atchutuni <[EMAIL PROTECTED]> wrote:
> Does any one have validation rule to match two fileds. Like PASSWORD, 
CONFIRM PASSWORD on the form. If both are not the same display error.

http://jakarta.apache.org/struts/userGuide/dev_validator.html#plugs

Scroll to "Comparing Two Fields"

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



Re: [FRIDAY] Some flash fun

2003-09-05 Thread Michael Ruppin
Distract him with some tasty ants.  Mmmm.  Ants.

Adam Hardy <[EMAIL PROTECTED]> wrote:I can hardly believe I am saying this, but the 
aardvark keeps eating my 
pixie.

On 09/05/2003 05:28 PM Bradley Handy wrote:
> That was neat.
> 
> 
>>-Original Message-
>>From: Andrew Hill [mailto:[EMAIL PROTECTED]
>>Sent: Friday, September 05, 2003 10:21 AM
>>To: Struts
>>Subject: [FRIDAY] Some flash fun
>>
>>I just know Mark loves flash stuff ;-)
>>This should take your mind off dealing with validator quirks for a
> 
> while.
> 
>>(Sorry mate - couldnt find any lisp to go with it!)
>>
>>http://www.freshsensation.com/samorost.swf
>>
>>
>>
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


-
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

Re: Validator cannot find message key

2003-09-05 Thread Adam Hardy
I see you're validating manually in the action. Have you tried doing it 
automatically with validate=true in the mapping?

I'm not saying you have to do it like that, but it should work that way. 
 You should specify the input attribute in the mapping as well.



On 09/05/2003 03:49 PM Yuan, Saul (TOR-ML) wrote:
Hi Adam,

The problem happens to both client side (javascript) and serverside.
Below are the codes for each file:
Struts-config.xml:













CreateMessageAction.java:

// -- validate user input
ActionErrors errors = messageForm.validate(mapping,
request);
if(errors != null)  
logger.debug("*** number of validation errors: "
+ errors.size());
else
logger.debug("*** number of validation errors:
none");

if (errors != null && !errors.isEmpty()) {
logger.debug("*** validation error saved");

saveErrors(request, errors);
if (messageForm.getPage() == 1)
return mapping.findForward("input" +
messageForm.getPage());
if (messageForm.getPage() == 2)
return mapping.findForward("input" +
messageForm.getPage());
}
// --
MessageForm.java:

public class MessageForm extends ValidatorForm implements Serializable {

...



BTW, I am able to see the messages when using , but
the validator just cannot find them, just says "null is required", the
validator is validating the required fields though.


Thanks,
Saul

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 4:14 AM
To: Struts Users Mailing List
Subject: Re: Validator cannot find message key




Hi Saul,
to try to narrow this down a little, is the problem javascript or
server-side, or both?
One thing it might be is where you specified your
ApplicationResources.properties. It should be something like this in
struts-config.xml :
  
Perhaps it would help if we could see the relevant form-definition in
your struts-config as well.
Adam



On 09/04/2003 10:03 PM Yuan, Saul (TOR-ML) wrote:

Here is what's in the validation.xml file:

   

   

 


 


 

...


and in the application resources file:

newmessage.label.messageName=Message Name
newmessage.label.zone=Distribution Zone
newmessage.label.audience=Target Audience
  ...





-Original Message-
From: Koni Roth [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 3:56 PM
To: Struts Users Mailing List
Subject: Re: Validator cannot find message key




Paste the faulty part of your validation.xml file maybe we can see
some


strange things. I had a similar problem and it was only an error in
writing...
Yuan, Saul (TOR-ML) wrote:


Hi,



I am using Struts Validator for validating a multi page form, some
how


the Validator cannot find the messages defined in the application
resources. I got the validation error messages like: null is
required.


I've defined arg0 in the validation.xml file, and the key of arg0
points


to a key in the application resource file. I verified that the
message


can be found through , but why not by the validator?
Any


ideas what the problem could be?





Thanks,

Saul




-

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




-

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

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Property files containing countries

2003-09-05 Thread Jeroen Breedveld
Hi all,

Can someone please tell me if someone outthere is maintaining property
files containing all country names and their translations in different
languages? I need them for a webapp I'm creating.

thanks and regards,

Jeroen

--

X-Hive Corporation
e-mail: [EMAIL PROTECTED]
http://www.x-hive.com 

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



Re: [FRIDAY] Some flash fun

2003-09-05 Thread Adam Hardy
I can hardly believe I am saying this, but the aardvark keeps eating my 
pixie.

On 09/05/2003 05:28 PM Bradley Handy wrote:
That was neat.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:21 AM
To: Struts
Subject: [FRIDAY] Some flash fun
I just know Mark loves flash stuff ;-)
This should take your mind off dealing with validator quirks for a
while.

(Sorry mate - couldnt find any lisp to go with it!)

http://www.freshsensation.com/samorost.swf



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


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

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [FRIDAY] Some flash fun

2003-09-05 Thread Bradley Handy
That was neat.

> -Original Message-
> From: Andrew Hill [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 10:21 AM
> To: Struts
> Subject: [FRIDAY] Some flash fun
> 
> I just know Mark loves flash stuff ;-)
> This should take your mind off dealing with validator quirks for a
while.
> (Sorry mate - couldnt find any lisp to go with it!)
> 
> http://www.freshsensation.com/samorost.swf
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: [OT] Test

2003-09-05 Thread Chen, Gin
I didn't get it.. can you try it again?

-Original Message-
From: Stephan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 4:26 PM
To: [EMAIL PROTECTED]
Subject: [OT] Test


Sorry I have not been able to send!



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

2003-09-05 Thread Stephan
Sorry I have not been able to send!



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


Re: [FRIDAY] Project Management

2003-09-05 Thread Adam Hardy
A golden oldie!

On 09/05/2003 03:12 PM Mark Galbreath wrote:
A tourist walked into a pet shop and was looking at the animals on
display.
While he was there, another customer walked in and said to the
shopkeeper, "I'll have a C monkey please." The shopkeeper nodded, went
over to a cage at  the side of the  shop and took out a monkey. He fit
a collar and leash, handed it to the customer, saying, "That'll be
$5,000." The customer paid and walked out with his monkey. Startled,
the tourist went over to the shopkeeper and said, "That is a very
expensive monkey. Why did it cost so much?" The shopkeeper answered,
"Ah, that monkey can program in C - very fast, tight code, no bugs,
well worth the money."
The tourist looked at the monkey in another cage. "That one's even more
expensive! $10,000! What does it do?" "Oh, that one's a C++ monkey; it
can manage object-oriented programming, Visual C++, even some Java. All
the really useful stuff," said the shopkeeper.
The tourist looked around for a little longer and saw a third monkey in
a cage of it's own. The price tag around its neck read $50,000. He
gasped to the shopkeeper, "That one costs more than all the other put
together!
What  on earth does it do?" The shopkeeper replied, "Well, I haven't
actually seen  it do anything, but, the other monkeys call him the
Project Manager."
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reg: Dyna Form Validation - Filed match

2003-09-05 Thread Adam Hardy
Somebody else asked that last week - check the archives, I don't have it 
off the top of my head.

Actually it might be in the apachewiki - and if it isn't, it should be.

Adam

On 09/05/2003 03:44 PM Raj Atchutuni wrote:
Does any one have validation rule to match two fileds. Like PASSWORD, CONFIRM PASSWORD 
on the form. If both are not the same display error.
Thanks
Raj
-
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
--
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: debug level of struts...

2003-09-05 Thread Pady Srinivasan

This did not work for me also. And looking at ActionServlet code, I am not
even sure if this is used anywhere. Also this is deprecated.

Also Navjot had suggested to set

org.apache.struts = FINE  in jre/lib/logging.properties.

This didn't work. But when I set

java.util.logging.ConsoleHandler.level = FINE in jre/lib/logging.properties

I get all debug messages. But for this to work, make sure you are using 1.4
VM and don't have log4j in your classpath. Else you have to set the log4j
properties file for log levels.


Took some digging into Struts, commons-logging, JDK 1.4 logging source and
docs.



Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: José Gustavo Zagato [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 9:17 AM
To: 'Struts Users Mailing List'
Subject: RE: debug level of struts...

Hey Folks !

I tried This configuration, and it seams that it don't change
anything to me... any ideias ?


  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]


-Original Message-
From: Peter Smith [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 09:25
To: Struts Users Mailing List
Subject: Re: debug level of struts...

Hi Pady,

You might try adding this to your action servlet in web.xml:


  debug
  99


Let me know if this works for you,

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: Pady Srinivasan <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Fri, 5 Sep 2003 08:10:33 -0400
> To: [EMAIL PROTECTED]
> Subject: debug level of struts...
> 
> 
> 
> Is there a way to make Struts print out more messages to standard out
? Like
> when it loads the form-bean and resets form values into the jsp ?
> 
> Thanks
> 
> -- pady
> [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]



OT: JBuilder and Web apps ?

2003-09-05 Thread Pady Srinivasan

JBuilder seems to translate/compile every jsp in current project everytime
you run the project ( it uses Tomcat for running the web app ). I couldn't
find a setting to make JB only translate/compile JSP pages that have changed
since the last build. It gets real slow when there are many JSP pages.



Thanks
 
-- pady
[EMAIL PROTECTED]
 


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



[FRIDAY] Some flash fun

2003-09-05 Thread Andrew Hill
I just know Mark loves flash stuff ;-)
This should take your mind off dealing with validator quirks for a while.
(Sorry mate - couldnt find any lisp to go with it!)

http://www.freshsensation.com/samorost.swf
 
 
 

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



Re: How to reference multiple form beans from one VelocityLayoutServlet set of page fragments?

2003-09-05 Thread Mike Kienenberger
Edgar P Dollin <[EMAIL PROTECTED]> wrote:
> I have gotten two html:forms two work in a limited fashion with struts.

Anything usable you'd like to be specific about? :)

I still have no clue how I can get a reference to a second form-bean.


> Note that your always visible form, doesn't have to be connected with a
> struts action so the problems with actions wouldn't apply.

I wasn't aware there would be problems with actions.  That's just a matter 
of having a separate action href for each form.


>  Also, the rules
> for forms are different if you are using tiles since each tile has an 
action
> and I believe tiles works with Velocity.

While Tiles does work with Velocity, it seems to be redundant.   I migrated 
from Tiles to Velocity, and once I was finished, I disabled Tiles.

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



Three questions

2003-09-05 Thread Rouven Gehm
Hi,

i'm new to Struts and have some minor questions which haven't been answered by Dr. 
Google, book or tutorial i've found and done so
far, so maybe someone here can give me a fast answer.
I've started working on a small application, where i nearly try to use everything 
Struts offers me,
tiles,nested,logic,...

1. How can i access the ApplicationResources.properties within an Action and/or 
ActionForm ?

2. For the LookupDispatchAction, can i only use Submit-Buttons with the keys like in 
the official documentation, or can i also use
a :link , but how do i set the key ?

3. I want to fill a tiles dynamically via a bean and tried to exchange this line

with this

and within the treeForm :
public String getActiveContent(){

return "/content/neu.jsp";

}

but it doesn't work. Have i misunderstood the use of tiles:put ???


Thanx in advance

Rouven



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



[FRIDAY] Project Management

2003-09-05 Thread Mark Galbreath
A tourist walked into a pet shop and was looking at the animals on
display.

While he was there, another customer walked in and said to the
shopkeeper, "I'll have a C monkey please." The shopkeeper nodded, went
over to a cage at  the side of the  shop and took out a monkey. He fit
a collar and leash, handed it to the customer, saying, "That'll be
$5,000." The customer paid and walked out with his monkey. Startled,
the tourist went over to the shopkeeper and said, "That is a very
expensive monkey. Why did it cost so much?" The shopkeeper answered,
"Ah, that monkey can program in C - very fast, tight code, no bugs,
well worth the money."

The tourist looked at the monkey in another cage. "That one's even more
expensive! $10,000! What does it do?" "Oh, that one's a C++ monkey; it
can manage object-oriented programming, Visual C++, even some Java. All
the really useful stuff," said the shopkeeper.

The tourist looked around for a little longer and saw a third monkey in
a cage of it's own. The price tag around its neck read $50,000. He
gasped to the shopkeeper, "That one costs more than all the other put
together!

What  on earth does it do?" The shopkeeper replied, "Well, I haven't
actually seen  it do anything, but, the other monkeys call him the
Project Manager."


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



RE: Validator cannot find message key

2003-09-05 Thread Yuan, Saul (TOR-ML)
Hi Adam,

The problem happens to both client side (javascript) and serverside.
Below are the codes for each file:

Struts-config.xml:

















CreateMessageAction.java:

// -- validate user input
ActionErrors errors = messageForm.validate(mapping,
request);

if(errors != null)  
logger.debug("*** number of validation errors: "
+ errors.size());
else
logger.debug("*** number of validation errors:
none");

if (errors != null && !errors.isEmpty()) {
logger.debug("*** validation error saved");

saveErrors(request, errors);
if (messageForm.getPage() == 1)
return mapping.findForward("input" +
messageForm.getPage());

if (messageForm.getPage() == 2)
return mapping.findForward("input" +
messageForm.getPage());
}
// --


MessageForm.java:

public class MessageForm extends ValidatorForm implements Serializable {

...



BTW, I am able to see the messages when using , but
the validator just cannot find them, just says "null is required", the
validator is validating the required fields though.



Thanks,
Saul

> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 4:14 AM
> To: Struts Users Mailing List
> Subject: Re: Validator cannot find message key
> 
> 
> 
> 
> 
> Hi Saul,
> to try to narrow this down a little, is the problem javascript or
> server-side, or both?
> 
> One thing it might be is where you specified your
> ApplicationResources.properties. It should be something like this in
> struts-config.xml :
> 
>  parameter="org.blacksail.ApplicationResources"
>  factory="org.apache.struts.util.PropertyMessageResourcesFactory"
>  null="true"/>
> 
> Perhaps it would help if we could see the relevant form-definition in
> your struts-config as well.
> 
> Adam
> 
> 
> 
> On 09/04/2003 10:03 PM Yuan, Saul (TOR-ML) wrote:
> > Here is what's in the validation.xml file:
> >
> > 
> >
> > 
> >   > page="1">
> >> resource="true"/>
> >  
> >   > page="1">
> >> resource="true"/>
> >  
> >   > page="1">
> >> resource="true"/>
> >  
> >  ...
> >
> >
> >
> > and in the application resources file:
> >
> > newmessage.label.messageName=Message Name
> > newmessage.label.zone=Distribution Zone
> > newmessage.label.audience=Target Audience
> >...
> >
> >
> >
> >
> >
> >>-Original Message-
> >>From: Koni Roth [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, September 04, 2003 3:56 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: Validator cannot find message key
> >>
> >>
> >>
> >>
> >>
> >>Paste the faulty part of your validation.xml file maybe we can see
> >
> > some
> >
> >>strange things. I had a similar problem and it was only an error in
> >>writing...
> >>
> >>Yuan, Saul (TOR-ML) wrote:
> >>
> >>>Hi,
> >>>
> >>>
> >>>
> >>>I am using Struts Validator for validating a multi page form, some
> >
> > how
> >
> >>>the Validator cannot find the messages defined in the application
> >>>resources. I got the validation error messages like: null is
> >
> > required.
> >
> >>>I've defined arg0 in the validation.xml file, and the key of arg0
> >
> > points
> >
> >>>to a key in the application resource file. I verified that the
> >
> > message
> >
> >>>can be found through , but why not by the validator?
> >
> > Any
> >
> >>>ideas what the problem could be?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>Thanks,
> >>>
> >>>Saul
> >>>
> >>>
> >>
> >>
>
>>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
> 
> 
> -
> 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]



Reg: Dyna Form Validation - Filed match

2003-09-05 Thread Raj Atchutuni
Does any one have validation rule to match two fileds. Like PASSWORD, CONFIRM PASSWORD 
on the form. If both are not the same display error.
Thanks
Raj


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

populating input tag of type image

2003-09-05 Thread Das, Amar
Hi,

I am using the following input tag in my html:form.



How can I populate this input image in the associated Action Form?  I am
using the following method, but it is not working.

  public void setMapSource() {
this.mapSource = map.getMapOutput().getURL();
  }

Thank you,
Amar

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



RE: [OT] Scheduling

2003-09-05 Thread Andrew Hill
Or:
Implement the PlugIn interface & add the appropriate reference to your class
in yoir struts-config.xml

-Original Message-
From: Hue Holleran [mailto:[EMAIL PROTECTED]
Sent: Monday, 1 September 2003 19:41
To: Struts Users Mailing List
Subject: RE: [OT] Scheduling


Using this method could you not do this in a servlet set in web.xml with
"load-on-startup"?

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 01 September 2003 11:58
> To: Struts Users Mailing List
> Subject: RE: [OT] Scheduling
>
>
>
> Yes, I have done that. But, now i am stuck as to where to invoke it from.
> I should not use Weblogic startup class.
>
> Any inputs ?
>
> thanks
> -raj
>
>
>
>
>
>
>   "Robert Taylor"
>
>   <[EMAIL PROTECTED]To:   "Struts
> Users Mailing List" <[EMAIL PROTECTED]>
>   .com>cc:
>
>Subject:  RE: [OT]
> Scheduling
>   01/09/2003 03:46
>
>   PM
>
>   Please respond to
>
>   "Struts Users
>
>   Mailing List"
>
>
>
>
>
>
>
>
>
> If you cannot use any third party tools, you can implement your own
> schedular using java.util.Timer and java.util.TimerTask.
>
> robert
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 01, 2003 1:37 AM
> > To: [EMAIL PROTECTED]
> > Subject: [OT] Scheduling
> >
> >
> > Hi All,
> > What would be the best implementation for scheduling a job in
> > Weblogic/J2EE
> > environment ?
> >
> >
> > thanks
> > -raj
> >
> >
> >
> >
> > -
> > 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]
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


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


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



How to set action in javascript.

2003-09-05 Thread deepaksawdekar
I am using the same jsp for create and modify techonolgy. Due to this i am facing some 
problems, like for that i need to set the action in the javascript. But for that i 
have to give the full path of action including base folder.  which i think its 
hardcoding, which i want to avoid. 

Is there any way i can do this. or some other way to get out of this problem.


What i am doing something like this,



function submitForm() {
 if (valAction == 'SUBMIT') {
Body.action="WebGUI/createTechnology.do";
}
if (valAction == 'UPDATE') {
Body.action="/WebGUI/updateTechnology.do";
}
}




Dir structure in tomcat is 

webapps
|_WebGUI
|_pages
|_web-inf.


Thanks and regards
Deepak.

   

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



RE: debug level of struts...

2003-09-05 Thread José Gustavo Zagato
Hey Folks !

I tried This configuration, and it seams that it don’t change
anything to me... any ideias ?


  José Gustavo Zagato Rosa
System Analyst - Atos Origin
[EMAIL PROTECTED]


-Original Message-
From: Peter Smith [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 5 de setembro de 2003 09:25
To: Struts Users Mailing List
Subject: Re: debug level of struts...

Hi Pady,

You might try adding this to your action servlet in web.xml:


  debug
  99


Let me know if this works for you,

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: Pady Srinivasan <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Fri, 5 Sep 2003 08:10:33 -0400
> To: [EMAIL PROTECTED]
> Subject: debug level of struts...
> 
> 
> 
> Is there a way to make Struts print out more messages to standard out
? Like
> when it loads the form-bean and resets form values into the jsp ?
> 
> Thanks
> 
> -- pady
> [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: [OT] Scheduling

2003-09-05 Thread Hue Holleran
Using this method could you not do this in a servlet set in web.xml with
"load-on-startup"?

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 01 September 2003 11:58
> To: Struts Users Mailing List
> Subject: RE: [OT] Scheduling
>
>
>
> Yes, I have done that. But, now i am stuck as to where to invoke it from.
> I should not use Weblogic startup class.
>
> Any inputs ?
>
> thanks
> -raj
>
>
>
>
>
>
>   "Robert Taylor"
>
>   <[EMAIL PROTECTED]To:   "Struts
> Users Mailing List" <[EMAIL PROTECTED]>
>   .com>cc:
>
>Subject:  RE: [OT]
> Scheduling
>   01/09/2003 03:46
>
>   PM
>
>   Please respond to
>
>   "Struts Users
>
>   Mailing List"
>
>
>
>
>
>
>
>
>
> If you cannot use any third party tools, you can implement your own
> schedular using java.util.Timer and java.util.TimerTask.
>
> robert
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Monday, September 01, 2003 1:37 AM
> > To: [EMAIL PROTECTED]
> > Subject: [OT] Scheduling
> >
> >
> > Hi All,
> > What would be the best implementation for scheduling a job in
> > Weblogic/J2EE
> > environment ?
> >
> >
> > thanks
> > -raj
> >
> >
> >
> >
> > -
> > 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]
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003


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



[FRIDAY] Project Management

2003-09-05 Thread Mark Galbreath
A tourist walked into a pet shop and was looking at the animals on
display.

While he was there, another customer walked in and said to the
shopkeeper, "I'll have a C monkey please." The shopkeeper nodded, went
over to a cage at  the side of the  shop and took out a monkey. He fit
a collar and leash, handed it to the customer, saying, "That'll be
$5,000." The customer paid and walked out with his monkey. Startled,
the tourist went over to the shopkeeper and said, "That is a very
expensive monkey. Why did it cost so much?" The shopkeeper answered,
"Ah, that monkey can program in C - very fast, tight code, no bugs,
well worth the money."

The tourist looked at the monkey in another cage. "That one's even more
expensive! $10,000! What does it do?" "Oh, that one's a C++ monkey; it
can manage object-oriented programming, Visual C++, even some Java. All
the really useful stuff," said the shopkeeper.

The tourist looked around for a little longer and saw a third monkey in
a cage of it's own. The price tag around its neck read $50,000. He
gasped to the shopkeeper, "That one costs more than all the other put
together!

What  on earth does it do?" The shopkeeper replied, "Well, I haven't
actually seen  it do anything, but, the other monkeys call him the
Project Manager."


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



RE: Avoid Validate After Submit

2003-09-05 Thread Pady Srinivasan

I don't know if this works in 1.01 but I tried in 1.1.

You can use the HttpServletRequest passed into the validate method to find
out which button was pressed ( getParameter("Button2") ), and return an
empty ActionErrors.


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: Andre Michel [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 8:36 AM
To: [EMAIL PROTECTED]
Subject: Avoid Validate After Submit

Hello ...

I'd like to have two submit buttons on a page. Pressing no. 1 should run
through validation, pressing no. 2 should avoid this. How am I able to this
in a
good way?

I'm using Struts 1.01 thus validate method is in the form bean.

Any hints would be welcomed,

Andre Michel

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


-
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: Avoid Validate After Submit

2003-09-05 Thread Mark Galbreath
You can't unless you move the validation to the Action class.

Mark

-Original Message-
From: Andre Michel [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:36 AM
To: [EMAIL PROTECTED]
Subject: Avoid Validate After Submit


Hello ...

I'd like to have two submit buttons on a page. Pressing no. 1 should run
through validation, pressing no. 2 should avoid this. How am I able to this
in a
good way?

I'm using Struts 1.01 thus validate method is in the form bean.

Any hints would be welcomed,

Andre Michel

--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


-
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: form value not loaded...

2003-09-05 Thread Pady Srinivasan

Yep. That did it. Thanks.

I couldn't find any documentation that stated that the html form name and
the form-bean definition name in struts-config.xml have to match. Maybe it
is so obvious...


Thanks
 
-- pady
[EMAIL PROTECTED]
 

-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 04, 2003 5:59 PM
To: Struts Users Mailing List
Subject: RE: form value not loaded...

Pady,

Your references are named "resumeInformation", but your action definition is
saving the form under the name "Resume".  Which are you using?  You might be
better off changing your action's name="Resume" to, perhaps,
name="resumeInformation".

Regards,
David

-Original Message-
From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 5:33 PM
To: [EMAIL PROTECTED]
Subject: form value not loaded...



I have a simple form that is associated with an Action that points back to
the same form. When I submit the form with some values for the fields, when
redisplaying the form after the Action, the value are not loaded. I did a
bean:write on the fields before displaying the form and the values are
written correctly.


Can anybody point out what I am doing wrong ?


...
...





   
   




Name:
Address:
Date of Birth:



Experience ( list last job first ):












...
...


This is the struts-config.xml:

...
...
  
 
  

  
  

   

  
...
...




Thanks

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



Avoid Validate After Submit

2003-09-05 Thread Andre Michel
Hello ...

I'd like to have two submit buttons on a page. Pressing no. 1 should run
through validation, pressing no. 2 should avoid this. How am I able to this in a
good way?

I'm using Struts 1.01 thus validate method is in the form bean.

Any hints would be welcomed,

Andre Michel

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post


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



RE: Syntax for accessing an object nested in a List of Lists [SOLVED]

2003-09-05 Thread Robert Taylor
Thanks for the reply Kris.

My problem wasn't really accessing the data on the page, it was
rather Struts accessing a property in an object buried in an ArrayList
of ArrayLists when the page was being rendered.

I was trying to keep my question as simple and to
the point as possible and therefore left out my actual intention.

The actual problem was using the erroneous syntax in an 





Which means the request parameter sent to the server was
"selectedProducts[0].[0].productId"

Well, when Struts tried to access the property (which it ultimately
delegated
to PropertyUtils) it was choking because there
was no getter for accessing the second ArrayList.

I described the work around in my follow up post.

Thanks again for the response.

robert

> -Original Message-
> From: Kris Schneider [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 8:48 AM
> To: Struts Users Mailing List
> Subject: RE: Syntax for accessing an object nested in a List of Lists
> [SOLVED]
>
>
> Robert,
>
> Damn, I was just replying to your original note when you posted ;-). I'll
> include my response below in case the "two-step" idea appeals to you:
>
> Not sure if you've moved on from this, but I think you're either
> gonna have to
> change the structure of your data or access it in multiple steps.
> Assuming you
> can use JSTL and you want direct access (vs. looping) to the
> nested object at a
> given index, I think you could do:
>
>   name="form"
>  property='<%= "list[" + index + "]" %>'/>
> 
>
> P.S.
> I just checked and there's no Struts-EL version of ?
> Would've been
> helpful here. One of the implications is that "index" has to be
> both a scripting
> and scoped variable.
>
> Quoting Robert Taylor <[EMAIL PROTECTED]>:
>
> > Okay. After looking at PropertyUtils I determined that this
> sort of syntax
> > is not allowed when accessing an object from an ArrayList of ArrayLists.
> > You have to wrap the child lists in an object which provides
> some type of
> > accessor/mutator. So in my case I have an ArrayList of
> ListWrapper objects.
> > Where each ListWrapper contains a List and getList()/setList(). Then the
> > syntax below
> > works - assuming my form bean has the methods getList()/setList().
> >
> > list[index].list[index].property
> >
> >
> > Kind of a PIA to have to wrap the nested lists. Seems like PropertyUtils
> > would contain logic to recognize this use case but as I look at
> the source
> > code for getIndexedProperty, the necessary modifications would be none
> > trivial.
> >
> > robert
> >
> > > -Original Message-
> > > From: Robert Taylor [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 04, 2003 5:15 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Syntax for accessing an object nested in a List of Lists
> > >
> > >
> > > I've run into some trouble accessing a nested object in my form.
> > > The object "lives" in a List of Lists type of structure.
> > >
> > > I've been using a syntax like the following assuming my List form
> > > property is named 'list'.
> > >
> > > list[index].[index].productId
> > >
> > > This must be wrong because I get the following exception:
> > >
> > > No getter method available for property list[0].[0].productId for
> > > bean under
> > > name org.apache.struts.taglib.html.BEAN'
> > >
> > > I tried the following just to make sure it could find the
> 'first level'.
> > >
> > > list[index]
> > >
> > > This doesn't cause any exceptions, so I must have the syntax
> > > wrong for accessing the 'second level' of the structure.
> > >
> > >
> > > Any help would be appreciated?
> > >
> > > robert
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > -
> > > 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]
> >
>
>
> --
> Kris Schneider 
> D.O.Tech   
>
> -
> 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: debug level of struts...

2003-09-05 Thread Navjot Singh
quick dirty way :-)

In you jdk installation dir..look out for logging.properties

and append the following line in the end
org.apache.struts = FINE

navjot

|-Original Message-
|From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
|Sent: Friday, September 05, 2003 5:41 PM
|To: [EMAIL PROTECTED]
|Subject: debug level of struts...
|
|
|
|
|Is there a way to make Struts print out more messages to standard 
|out ? Like
|when it loads the form-bean and resets form values into the jsp ?
|
|Thanks
| 
|-- pady
|[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]



Design Question - Need to put assertions in Actions?

2003-09-05 Thread White, Joshua A (HTSC, CASD)
Say I have a form "formFoo" which manages some noun "Foo".  It has
two different actions, "newFoo" and "editFoo".  Each has specific logic
depending on whether or not Foo exists.  I am experiencing a problem where
users create Foo, but then (either by bookmark or the back button) users are
returning to the "newFoo" action and edit Foo using the "new" action instead
of the "edit" action.  

I have looked into the transaction token to eliminate the double submit
problem, but I have not found a solution to this problem.  So far, I have
placed some assertions in the "newFoo" action which validates that foo does
not already exist.  If it does exist, it forwards control to "editFoo".

This brings about the design question.  Putting this kind of
assertion/redirection logic in each action class gets messy fast and makes
each action class more of a controller than an action class.  (Which is not
where I want to go)

Any suggestions on how to handle this type of problem? 

Regards,

Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all copies.


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



RE: Syntax for accessing an object nested in a List of Lists [SOLVED]

2003-09-05 Thread Kris Schneider
Robert,

Damn, I was just replying to your original note when you posted ;-). I'll
include my response below in case the "two-step" idea appeals to you:

Not sure if you've moved on from this, but I think you're either gonna have to
change the structure of your data or access it in multiple steps. Assuming you
can use JSTL and you want direct access (vs. looping) to the nested object at a
given index, I think you could do:




P.S.
I just checked and there's no Struts-EL version of ? Would've been
helpful here. One of the implications is that "index" has to be both a scripting
and scoped variable.

Quoting Robert Taylor <[EMAIL PROTECTED]>:

> Okay. After looking at PropertyUtils I determined that this sort of syntax
> is not allowed when accessing an object from an ArrayList of ArrayLists.
> You have to wrap the child lists in an object which provides some type of
> accessor/mutator. So in my case I have an ArrayList of ListWrapper objects.
> Where each ListWrapper contains a List and getList()/setList(). Then the
> syntax below
> works - assuming my form bean has the methods getList()/setList().
> 
> list[index].list[index].property
> 
> 
> Kind of a PIA to have to wrap the nested lists. Seems like PropertyUtils
> would contain logic to recognize this use case but as I look at the source
> code for getIndexedProperty, the necessary modifications would be none
> trivial.
> 
> robert
> 
> > -Original Message-
> > From: Robert Taylor [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 04, 2003 5:15 PM
> > To: [EMAIL PROTECTED]
> > Subject: Syntax for accessing an object nested in a List of Lists
> >
> >
> > I've run into some trouble accessing a nested object in my form.
> > The object "lives" in a List of Lists type of structure.
> >
> > I've been using a syntax like the following assuming my List form
> > property is named 'list'.
> >
> > list[index].[index].productId
> >
> > This must be wrong because I get the following exception:
> >
> > No getter method available for property list[0].[0].productId for
> > bean under
> > name org.apache.struts.taglib.html.BEAN'
> >
> > I tried the following just to make sure it could find the 'first level'.
> >
> > list[index]
> >
> > This doesn't cause any exceptions, so I must have the syntax
> > wrong for accessing the 'second level' of the structure.
> >
> >
> > Any help would be appreciated?
> >
> > robert
> >
> >
> >
> >
> >
> >
> >
> > -
> > 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]
> 


-- 
Kris Schneider 
D.O.Tech   

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



Re: debug level of struts...

2003-09-05 Thread Peter Smith
Hi Pady,

You might try adding this to your action servlet in web.xml:


  debug
  99


Let me know if this works for you,

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: Pady Srinivasan <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Fri, 5 Sep 2003 08:10:33 -0400
> To: [EMAIL PROTECTED]
> Subject: debug level of struts...
> 
> 
> 
> Is there a way to make Struts print out more messages to standard out ? Like
> when it loads the form-bean and resets form values into the jsp ?
> 
> Thanks
> 
> -- pady
> [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: debug level of struts...

2003-09-05 Thread Bradley Handy
http://jakarta.apache.org/struts/userGuide/building_controller.html#logg
ing

> -Original Message-
> From: Pady Srinivasan [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 05, 2003 8:11 AM
> To: [EMAIL PROTECTED]
> Subject: debug level of struts...
> 
> 
> 
> Is there a way to make Struts print out more messages to standard out
?
> Like
> when it loads the form-bean and resets form values into the jsp ?
> 
> Thanks
> 
> -- pady
> [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: Syntax for accessing an object nested in a List of Lists [SOLVED]

2003-09-05 Thread Robert Taylor
Okay. After looking at PropertyUtils I determined that this sort of syntax
is not allowed when accessing an object from an ArrayList of ArrayLists.
You have to wrap the child lists in an object which provides some type of
accessor/mutator. So in my case I have an ArrayList of ListWrapper objects.
Where each ListWrapper contains a List and getList()/setList(). Then the
syntax below
works - assuming my form bean has the methods getList()/setList().

list[index].list[index].property


Kind of a PIA to have to wrap the nested lists. Seems like PropertyUtils
would contain logic to recognize this use case but as I look at the source
code for getIndexedProperty, the necessary modifications would be none
trivial.

robert

> -Original Message-
> From: Robert Taylor [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 04, 2003 5:15 PM
> To: [EMAIL PROTECTED]
> Subject: Syntax for accessing an object nested in a List of Lists
>
>
> I've run into some trouble accessing a nested object in my form.
> The object "lives" in a List of Lists type of structure.
>
> I've been using a syntax like the following assuming my List form
> property is named 'list'.
>
> list[index].[index].productId
>
> This must be wrong because I get the following exception:
>
> No getter method available for property list[0].[0].productId for
> bean under
> name org.apache.struts.taglib.html.BEAN'
>
> I tried the following just to make sure it could find the 'first level'.
>
> list[index]
>
> This doesn't cause any exceptions, so I must have the syntax
> wrong for accessing the 'second level' of the structure.
>
>
> Any help would be appreciated?
>
> robert
>
>
>
>
>
>
>
> -
> 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]



debug level of struts...

2003-09-05 Thread Pady Srinivasan


Is there a way to make Struts print out more messages to standard out ? Like
when it loads the form-bean and resets form values into the jsp ?

Thanks
 
-- pady
[EMAIL PROTECTED]
 


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



RE: How to reference multiple form beans from one VelocityLayoutS ervlet set of page fragments?

2003-09-05 Thread Edgar P Dollin
I have gotten two html:forms two work in a limited fashion with struts.
Note that your always visible form, doesn't have to be connected with a
struts action so the problems with actions wouldn't apply.  Also, the rules
for forms are different if you are using tiles since each tile has an action
and I believe tiles works with Velocity.

Edgar

> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 04, 2003 6:34 PM
> To: Struts Users Mailing List
> Subject: How to reference multiple form beans from one 
> VelocityLayoutServlet set of page fragments?
> 
> 
> I need to have two forms displayed on the same Velocity 
> template page.   I 
> can receive a reference to one form bean via the 
> ActionMapping.  I've been 
> unable to determine how to gain a reference to the second form bean.
> 
> 
> Reference to how it could be done in pure jsp:
> 

http://www.mail-archive.com/[EMAIL PROTECTED]/msg22976.html

Reference to how multiple forms may not work with Velocity:


http://www.mail-archive.com/[EMAIL PROTECTED]/msg06945.html

Contrary reference that it might be possible to reference "multiple forms" 
with $form in Velocity:


http://www.mail-archive.com/[EMAIL PROTECTED]/msg05261.html


Probably unimportant details:

I'm using Struts 1.1, Tomcat 4.1.27, the Validator, and the 
VelocityLayoutServlet from Velocity-tools-1.0.  I've got my layout broken 
out into the generic standard:

layout
header
menu
body
footer

I've got a form that is generally visible in the menu section. I have
arbitrary forms that can appear in the body section, and these I plan 
to pass by the action mapping.
I'm using org.apache.struts.validator.DynaValidatorForm for all Form Beans.

Thanks!

-Mike


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



RE: Thanks

2003-09-05 Thread Andrew Hill
+1

-Original Message-
From: Rohit Aeron [mailto:[EMAIL PROTECTED]
Sent: Friday, 5 September 2003 18:16
To: Struts Users Mailing List
Subject: RE: Thanks


All the best for your future endeavour

Regards
Rohit

-Original Message-
From: Mehta, Chirag (IT) [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 3:29 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Thanks

Hello guys,

My internship had finished and I would just like to thanks everyone who
has helped me in this user group. I really appriecate it.

Good luck for the future of Struts and the taglibs. It a great
technology and hope it goes far.

Regards,

Chirag





--
NOTICE: If received in error, please destroy and notify sender.  Sender does
not waive confidentiality or privilege, and use is prohibited.


*--
This message and any attachment(s) is intended only for the use of the
addressee(s) and may contain information that is PRIVILEGED and
CONFIDENTIAL. If you are not the intended addressee(s), you are hereby
notified that any use, distribution, disclosure or copying of this
communication is strictly prohibited. If you have received this
communication in error, please erase all copies of the message and its
attachment(s) and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and
not of Kanbay.

Although we have taken steps to ensure that this e-mail and any
attachment(s) are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.


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



  1   2   >