pdf file open.

2004-03-09 Thread deepaksawdekar
Hi,
I am trying to open a pdf file. I am using servlet and struts in my application. 
Everything is working fine except it ask me two times do you want to open or save the 
file, once for the file whoes name is session id and second time for the actual file. 
Am i doing some thing wrong.
Please help me 


Servelet code is as follows

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException {

//Method name 
final String METHOD_NAME = CLASS_NAME.concat(".doGet()");

String sessionId = request.getParameter(GUIConstants.USER_SESSION_ID);
String encodefileName =
request.getParameter(GUIConstants.USER_FILE_NAME);
String fileName = new String();
try {
fileName =
URLDecoder.decode(encodefileName, GUIConstants.CHAR_ENCODING);
} catch (Exception ex) {
LOGGER.error(METHOD_NAME, ex);
}
HttpSession session = request.getSession();

if (!session.getId().equals(sessionId)) {
// Don't do anything - just return
//response.sendRedirect(GUIConstants.LOGIN_URL);
return;
}

LOGGER.debug("File Name " + fileName);
int dot = fileName.lastIndexOf(CommonConstants.DOT) + 1;
if(fileName.substring(dot).equalsIgnoreCase(CommonConstants.PDF)) {
response.setContentType(GUIConstants.PDF_CONTENT_TYPE);
} else {
response.setContentType(GUIConstants.CONTENT_TYPE);
}
response.setHeader(
GUIConstants.CONTENT_DIS,
GUIConstants.CONTENT_ATT + "\"" + fileName + "\"");

try {
String filePath =
GetProperties.getValue(
PropertiesFileConstants.PMP_PROP_FILE_PATH,
CommonConstants.DOCUMENT_LOCAL_STORE_PATH_FOR_VIEWING);
ServletOutputStream out = response.getOutputStream();
String fullFilePath = filePath + File.separator + fileName;
FileInputStream fin = new FileInputStream(new File(fullFilePath));
byte[] buf = new byte[GUIConstants.FILE_SIZE];
int len = 0;
while ((len = fin.read(buf)) != -1) {
out.write(buf);
}
out.flush();
fin.close();

} catch (Exception e) {
//e.printStackTrace();
LOGGER.error(e.getMessage(), e);
}

}

/**
 * @param req HttpServletRequest
 * @param res HttpServletResponse
 * @throws ServletException servlet exception
 */
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException {
doGet(req, res);
}


Thanks and Regards
Deepak.

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



struts-user@jakarta.apache.org

2004-02-04 Thread deepaksawdekar
Hi 
I want to pass the varible to key of the statement 

eg. 
if ( some condition )
str = deepak
else
str = xyz

Now i want to pass the value of str as a key to bean:message how can i do this 




Thanks and Regards
deepak 

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



File path validation in formfile.

2003-11-24 Thread deepaksawdekar
Hi 
I am using the org.apache.struts.upload.FormFile.
Now i want to validate wheather a file path entered by user is valid or not.



Thanks and Regards
Deepak.



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



forward to new window.

2003-11-20 Thread deepaksawdekar
Hi,
I have a requirement, based on certain condition in action class i want the forward to 
open a page in same window or  different page in new window how can i implement this.


thanks in advance
Deepak.

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



ActionError.

2003-11-12 Thread deepaksawdekar
Hi All, 
Please help me how to do this. I want to create a instance of ActionError, but i don't 
want to the messages to be taken from applicationresource.properties file. 
I have to give some other message which will be hard coded. 

sample code
I want some thing like this,

err = new ActionError("deepak");
Errors = new ActionError("000", err);

Where "deepak" is not a key in applicationResource.properties file. 



Thanks and Regards
Deepak.

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



ActionErrors are not displayed after page is refreshed.

2003-11-06 Thread deepaksawdekar
Hi,
I have a jsp in which i have written the following code to display the errors,






  

 



Along with that i have a code to at the bottom of page to go to top of the pages as 
follows,




Now the problem i am facing is that when i click on top image the page gets refreshed 
and errors messages goes off.
Is there any way i can provide a code to goto top along with keeping the error 
messages.


Thanks and Regards
Deepak.

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



RE: Can't insert page '../common/comLayout.jsp' : Connection reset by peer: socket write error

2003-11-05 Thread deepaksawdekar
I am calling a function for the underline java class, after returing from 
function(Function is getting excuting sucessfully)  i forward to a jsp. but i get this 
error " Can't insert page '../common/comLayout.jsp' : Connection reset by peer: socket 
write error" .  Now my first point how can i avoid this error, what may be wrong. 
Secondly can i avoid calling the function again.
error message is attach to my earlier mail.

Thanks and Regards
Deepak.
-Original Message-
From: deepaksawdekar 
Sent: Wednesday, November 05, 2003 4:17 PM
To: Struts Users Mailing List
Subject: Can't insert page '../common/comLayout.jsp' : Connection reset
by peer: socket write error


after the execution of execute method of the action class i am getting this error. 
Any idea why i am getting this error. 

DEBUG [Thread-3] org.apache.struts.action.RequestProcessor - 
processForwardConfig(ForwardConfig[name=NDA,path=/pages/legal/lglCreateNDA.jsp,redirect=false,contextRelative=false])
 2003-11-05 15:52:08,417 128114 DEBUG [Thread-3] 
org.apache.struts.taglib.tiles.InsertTag - insert page='../common/comLayout.jsp'.
 2003-11-05 15:52:08,417 128114 DEBUG [Thread-18] 
org.apache.struts.taglib.tiles.InsertTag - insert page='../common/comLayout.jsp'.
 2003-11-05 15:52:08,427 128124 DEBUG [Thread-18] 
org.apache.struts.taglib.tiles.InsertTag - Can't insert page 
'../common/comLayout.jsp' : Connection reset by peer: socket write error
 java.net.SocketException: Connection reset by peer: socket write error
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at 
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:652)
 at 
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:166)
 at 
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:523)
 at org.apache.coyote.Response.doWrite(Response.java:513)
 at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:380)
 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
 at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:341)
 at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:554)
 at 
org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:227)
 at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:808)
 at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
 at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
 at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
 at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
 at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
 at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
 at org.apache.jsp.lglCreateNDA_jsp._jspx_meth_tiles_insert_0(lglCreateNDA_jsp.java:99)
 at org.apache.jsp.lglCreateNDA_jsp._jspService(lglCreateNDA_jsp.java:57)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
 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(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.

Can't insert page '../common/comLayout.jsp' : Connection reset by peer: socket write error

2003-11-05 Thread deepaksawdekar
after the execution of execute method of the action class i am getting this error. 
Any idea why i am getting this error. 

DEBUG [Thread-3] org.apache.struts.action.RequestProcessor - 
processForwardConfig(ForwardConfig[name=NDA,path=/pages/legal/lglCreateNDA.jsp,redirect=false,contextRelative=false])
 2003-11-05 15:52:08,417 128114 DEBUG [Thread-3] 
org.apache.struts.taglib.tiles.InsertTag - insert page='../common/comLayout.jsp'.
 2003-11-05 15:52:08,417 128114 DEBUG [Thread-18] 
org.apache.struts.taglib.tiles.InsertTag - insert page='../common/comLayout.jsp'.
 2003-11-05 15:52:08,427 128124 DEBUG [Thread-18] 
org.apache.struts.taglib.tiles.InsertTag - Can't insert page 
'../common/comLayout.jsp' : Connection reset by peer: socket write error
 java.net.SocketException: Connection reset by peer: socket write error
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at 
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:652)
 at 
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:166)
 at 
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:523)
 at org.apache.coyote.Response.doWrite(Response.java:513)
 at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:380)
 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
 at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:341)
 at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:554)
 at 
org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:227)
 at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209)
 at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:808)
 at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:391)
 at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
 at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
 at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
 at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
 at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
 at org.apache.jsp.lglCreateNDA_jsp._jspx_meth_tiles_insert_0(lglCreateNDA_jsp.java:99)
 at org.apache.jsp.lglCreateNDA_jsp._jspService(lglCreateNDA_jsp.java:57)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
 at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
 at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
 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(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Standar

Default buttons

2003-10-20 Thread deepaksawdekar
Hi, 
How can i define a default buttons on a jsp developed using struts. 
My requirement is that on when i press enter key from keyboard page should get submit 
(eventually calling onclick of submit) and 
when i click on esc key it should be cancel ( callin onclick of cancel) .


Thanks and regards
Deepak.

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



default for parameter

2003-09-29 Thread deepaksawdekar
Hi,
I have a action class extended for DispatchAction class.
Is there any way if the parameter value is not define it will call some predefine 
method.

e.g
my strut config is as follows






Now if there is no dispatch variable in any scope, is there any way by which a some 
defalut method will be called.


Thanks and regards
Deepak 



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



RE: Disabling Buttons on View

2003-09-24 Thread deepaksawdekar
you can try some thing like this.







Thanks and Regards
Deepak.


-Original Message-
From: Shane Mingins [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 8:27 AM
To: '[EMAIL PROTECTED]'
Subject: Disabling Buttons on View


Hi

If I wish to simulate the enable/disable of buttons that users are used to
with a rich GUI on a JSP view, is there are nicer way than using the logic
tags like this?


   



   


Thanks
Shane

Shane Mingins
Analyst Programmer
Assure NZ Ltd
Ph 644 494 2522



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



web site usage statistics

2003-09-22 Thread deepaksawdekar
Any pointer to implement this for struts appliation.


Deepak.

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



RE: Getting JasperException no getter method for property

2003-09-19 Thread deepaksawdekar
Change the name of 

This variables.

public ColDataBean getDataarray(int index) {
return (ColDataBean)dataarray.get(index);
}

/** 
 * Set the myarray.
 * @param myarray The myarray to set
 */
public void setDataarray(int index ,  ColDataBean bean) {


Deepak.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, September 19, 2003 7:57 PM
To: [EMAIL PROTECTED]
Subject: Getting JasperException no getter method for property


Hi 
i have under given form , jsp  and am getting exception that the getter method not 
found.

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

http://easystruts.sf.net).">
Struts Form for mapForm



 
  
   
  
  
   
  
 
 






package com.test.struts.forms;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.test.bean.ColDataBean;

/** 
 * MapForm.java created by EasyStruts - XsltGen.
 * http://easystruts.sf.net
 * created on 09-19-2003
 * 
 * XDoclet definition:
 * @struts:form name="mapForm"
 */
public class MapForm extends ActionForm {

// - Instance Variables

/** myarray property */
private ArrayList dataarray;

// - Methods

/** 
 * Method validate
 * @param ActionMapping mapping
 * @param HttpServletRequest request
 * @return ActionErrors
 */
public ActionErrors validate(
ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(dataarray==null || dataarray.size()==0)
 errors.add("userid",new ActionError("abcd"));
 return errors;
}

/** 
 * Returns the myarray.
 * @return ArrayList
 */
public ArrayList getDataarray() {
System.out.println("In get array");
return dataarray;
}

/** 
 * Set the myarray.
 * @param myarray The myarray to set
 */
public void setDataarray(ArrayList list) {
System.out.println("In set array");
this.dataarray = list;
}

/** 
 * Returns the myarray.
 * @return ArrayList
 */
public ColDataBean getDataarray(int index) {
return (ColDataBean)dataarray.get(index);
}

/** 
 * Set the myarray.
 * @param myarray The myarray to set
 */
public void setDataarray(int index ,  ColDataBean bean) {
dataarray.add(index,bean);
}

}


I home to achieve an input form based on the ArrayList which contains the list of 
beans which has two properties name, value. Is this approach correct other wise how do 
i achieve the same using a TreeMap based input form.

Thanks and Regards 

Shishir



Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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



org.apache.commons.digester.Digester error

2003-09-18 Thread deepaksawdekar
Hi All,
I am using struts and jstl on tomcat. But when I start the tomcat I always get this 
error. Even though my application works fine. I would like to know what these error 
and how to get rid of them




Sep 18, 2003 2:47:53 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 6 column 19: Document root element "taglib", must ma
tch DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "taglib", must match DOCTYP
E root "null".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Er
rorHandlerWrapper.java:232)
at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.
java:173)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
java:362)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
java:296)
at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDT


Thanks and Regards
Deepak

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



Sample code for Pagination.

2003-09-17 Thread deepaksawdekar
Where can i get the sample taglib for pagination tag.

Thanks and Regards
Deepak

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



RE: One form multiple Action mapping

2003-09-15 Thread deepaksawdekar
Hey you can do some thing like this.















-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 8:49 PM
To: 'Struts Users Mailing List'
Subject: RE: One form multiple Action mapping


Come to think of it more, since I want the submitted form to use
different action mappings, I thought of using something like Scanfold's
RelayAction which dispatches to different action mappings based on the
parameter (in my case 'method'). On each action mapping I could set my
required roles etc. and then have them all forwarded to the
RegistrationAction for processing.
This way I can distinguish between them and still process them in a
single point (Action).
What do you think?

Erez


-Original Message-
From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 4:03 PM
To: 'Struts Users Mailing List'
Subject: RE: One form multiple Action mapping



What about:





 







-Original Message-
From: Erez Efrati [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 11:04 AM
To: 'Struts Users Mailing List'
Subject: One form multiple Action mapping

I have a registration form (RegForm) which based on the method/mode I
want to direct it to a different action mapping in order to assign
different roles or security restrictions. I have a single RegAction
extending the DispatchAction class, with parameter 'method' as the
dispatch parameter. 

I thought of maybe put a  and based on the 'method' put the
correct  one. But then again maybe this will harm the
javascript validation, cause the name of the form will be different.

How can this be done? 

Registration.jsp:

 
...



Thanks,
Erez



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



Tiles and Struts.

2003-09-15 Thread deepaksawdekar
Hello,
We are using struts and tiles for view component of our application. 
We are facing the problem of setting the title for the jsp. The title has to be taken 
from the properties file and it depends upon the body of the tiles. Any pointer how to 
do this.
my jsp file is as follows.


<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>


  
  
   
  



I am setting the tile in gblTechnologyBody.jsp file.  It works fine when i have html 
head  in all the jsp above. But if i remove html head tag from the jsp it does not 
work.
I am removing the HTML head tag since when i do view source from the it i get 5 
different html head and body tags. 
4 for the jsp above and one for the layout.jsp. 


Pl. advice 

Thanks and Regards
Deepak.

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



Desing Question

2003-09-15 Thread deepaksawdekar
Hello,
I have a separate Data Object and Action Form bean. In my form beans have a attribute 
which corresponds to Data Object. And had written a separate setter and getter methods 
for each attribute of Data object and some addition required for working of struts. 
Like this.
e.g.

public class CompanyForm extends ActionForm{
/*
 * CompanyInfo object
 */
 
private CompanyInfo companyInfo;

public String String getCompanyName(){
return companyInfo.getCompanyName();
}

public void setCompanyName(String str) {
this.companyInfo.setCompanyName(str);
}
...

Now my question are
1. Is this a good design.
2. Do my Data object also have to implement java.io.Serializable interface so that 
they can be stored in session scope.
I am asking question 2 since some times i get the error saying CompanyInfo is not 
serializable. To remove this error i have to delete work directory from tomcat 
installation and restart the tomcat server. I thaught that i am getting this error 
since because data object CompanyInfo is not implementating java.io.Serializable.

Please advice.



Thanks and Regards
Deepak.

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



design question

2003-09-12 Thread deepaksawdekar
I am displaying some dropdown boxes on my jsp. I have to take the values for them from 
ApplicationResource file.
I have writen a separate file which will read the properties file and return me the 
values in array list. 
Now I have to set this arraylist to the property of my form bean, now the question is 
should i assign this arraylist in action class execute method  or will it good option 
to assign this value in from bean constructor, since the value are not going to change 
dynamically.
Please suggest me which is better option
1. set values in action execute method
2. set values in constructor of form bean.


Thanks and Regards
Deepak.

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



RE: Error:Cannot find bean org.apache.struts.taglib.html.BEAN in any Scope

2003-09-12 Thread deepaksawdekar
Action attribute in form tag will be missing. if its the requirement, added the name 
attribute to all the  tags.

Deepak.

-Original Message-
From: Ritvik [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 8:08 PM
To: [EMAIL PROTECTED]
Subject: Error:Cannot find bean org.apache.struts.taglib.html.BEAN in
any Scope


Hi There,

I am following the book 'Struts In Action' books and trying to build the

Sample Logon Application from first few chapters. I was able to display
Welcome page (Welcome.do) and when i click on 'Sign In' link, I am
getting the following error? Please also review the configurations added

to struts-config file. Why does 'logonForm' bean being created?

javax.servlet.jsp.JspException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any

scope
 at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:714)
 at
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:193)

 at org.apache.jsp.Logon$jsp._jspService(Logon$jsp.java:116)

-- Welcome.jsp code snippet --

Sign in









thanks,
Ritvik


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



getproperty for tag returns null.

2003-09-10 Thread deepaksawdekar
I am using following code in  a jsp,





when getLocationListValues return Null i got the error page saying 
getlocationlistvalues return null and so so... I this there any way where i can catch 
this exception, and show some customize error page, Or is there a way where i can show 
the empty dropdown box


Thanks and Regards
Deepak.

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



RE: problem in getproperties.

2003-09-10 Thread deepaksawdekar
Thanks for the response. 
by this code

MessageResources.getMessageResources(propertyFilePath);
rtnString = messages.getMessage(key);

Since I have added a utility class for getting the property. Will this create any 
problem in future.



-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 8:29 PM
To: Struts Users Mailing List
Subject: RE: problem in getproperties.


and before you opened my post Im sure ;->

-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 9 September 2003 22:51
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: problem in getproperties.


I thought about that, Andrew  After I hit send, of course.  :-)

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 10:36 AM
To: Struts Users Mailing List
Subject: RE: problem in getproperties.


Maybe thats not the particular property file he is trying to load?

Try using

getServlet().getServletContext().getResourceAsStream( propertyFilePath );

In your actions execute method.


This method is different from java.lang.Class.getResourceAsStream, which
uses a class loader. This method allows servlet containers to make a
resource available to a servlet from any location, without using a class
loader.


-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 9 September 2003 22:23
To: Struts Users Mailing List
Subject: RE: problem in getproperties.


Why are you creating a new I/O object when the execute method gets the
resource passed as a parameter argument?

MessageResources properties = getResources( request );
properties.getProperty( key );

Mark

-Original Message-
From: deepaksawdekar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 09, 2003 8:58 AM
To: Struts Users Mailing List
Subject: problem in getproperties.


I am using following code to access the property from properties file in my
action class.
Code snippet is as follows...
..
InputStream in = ClassLoader.getSystemResourceAsStream( propertyFilePath);
properties.load(in);
value = properties.getProperty(key);


When I write the main in action class it works fine
but when i copied the same code to execute method, the code does not load
the propertyfilepath file properly even though in both the case class path
and location of file is same.

Am i doing something wrong.


Deepak

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




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


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


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


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


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



problem in getproperties.

2003-09-09 Thread deepaksawdekar
I am using following code to access the property from properties file in my action 
class.
Code snippet is as follows...
..
InputStream in = ClassLoader.getSystemResourceAsStream( propertyFilePath);
properties.load(in);
value = properties.getProperty(key);


When I write the main in action class it works fine
but when i copied the same code to execute method, the code does not load the 
propertyfilepath file properly even though in both the case class path and location of 
file is same. 

Am i doing something wrong.


Deepak 

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

2003-09-05 Thread deepaksawdekar
Sorry My mistake .
Wrong properties file. Had put value in double quotes.

like 
10007="error";



-Original Message-----
From: deepaksawdekar 
Sent: Friday, September 05, 2003 3:43 PM
To: Struts Users Mailing List
Subject:  problem



When i have a number as a key in properties file, tag   
gives me some wired error.

I am using this tag in javascripts.

Deepak.

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


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



problem

2003-09-05 Thread deepaksawdekar

When i have a number as a key in properties file, tag   
gives me some wired error.

I am using this tag in javascripts.

Deepak.

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



RE: Tabindex missing in generated code.

2003-09-05 Thread deepaksawdekar
Hi Mark,
I found why its working at your end. 
You have given a tabindex to  tag,

What i am doing is 
Create new

Using the tabindex in the  tag only.

Thanks and Regards
Deepak .

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 4:17 AM
To: Struts Users Mailing List
Subject: Re: Tabindex missing in  generated code.


My guess its something else..

I'd send you a snippet, its usually my preferred way of explanation, 
but i just did what you're doing.. My guess its the version of struts 
or something. Just in case here's exactly what works. I even tried 
having links the same same tabindex number and it works. if its not I'm 
as stumped as you are.






Cheers Mark

On Wednesday, September 3, 2003, at 06:00 AM, deepaksawdekar wrote:

> Thanks mark,
> I tried it but its not working at my end. Even I tried to put sparrow, 
> but in vain. I am using struts 1.1 , Can you please send me you code 
> snippet.
>
>
> Deepak ..
>
> -Original Message-
> From: Mark Lowe [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 02, 2003 11:10 PM
> To: Struts Users Mailing List
> Subject: Re: Tabindex missing in  generated code.
>
>
> After seeing your posting I gave it a go, and it worked..
>
> My understanding is that its just an attribute thats passed straight
> through nothing clever going on, it should even work if you don't stick
> a number in there.
>
> For example try tabindex="sparrow" and it should render okay. Although
> any javascript might start dummy-spitting.
>
> Thats probably a useful as a chocolate fire-guard. But I guess you
> could check the version of struts you're using and that sort of thing.
>
> Cheers Mark
>
> On Tuesday, September 2, 2003, at 04:46 PM, deepaksawdekar wrote:
>
>> Hi,
>> I am using tabindex to set my tab sequence.
>>
>> jsp as a code
>>
>> .
>> .
>> Create new
>> .
>> .
>>
>> Generated html code for the above jsp is
>>
>> Create new
>>
>> ... missing tabindex
>>
>> am i doing something wrong...
>>
>>
>>
>> Deepak
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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


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



RE: Tabindex missing in generated code.

2003-09-02 Thread deepaksawdekar
Thanks mark,
I tried it but its not working at my end. Even I tried to put sparrow, but in vain. I 
am using struts 1.1 , Can you please send me you code snippet.


Deepak ..

-Original Message-
From: Mark Lowe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 11:10 PM
To: Struts Users Mailing List
Subject: Re: Tabindex missing in  generated code.


After seeing your posting I gave it a go, and it worked..

My understanding is that its just an attribute thats passed straight 
through nothing clever going on, it should even work if you don't stick 
a number in there.

For example try tabindex="sparrow" and it should render okay. Although 
any javascript might start dummy-spitting.

Thats probably a useful as a chocolate fire-guard. But I guess you 
could check the version of struts you're using and that sort of thing.

Cheers Mark

On Tuesday, September 2, 2003, at 04:46 PM, deepaksawdekar wrote:

> Hi,
> I am using tabindex to set my tab sequence.
>
> jsp as a code
>
> .
> .
> Create new
> .
> .
>
> Generated html code for the above jsp is
>
> Create new
>
> ... missing tabindex
>
> am i doing something wrong...
>
>
>
> Deepak
>
> -
> 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]



Tabindex missing in generated code.

2003-09-02 Thread deepaksawdekar
Hi,
I am using tabindex to set my tab sequence.

jsp as a code

.
.
Create new
.
.

Generated html code for the above jsp is 

Create new

... missing tabindex

am i doing something wrong...



Deepak 

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



Tabindex not working in

2003-09-02 Thread deepaksawdekar
Hi,
I am using tabindex to set my tab sequence.
I need to set the tabindex for link also,
my jsp as a line
.
.
Create new
.
.

But the html is generates as follows for the above line..

Create new

... missing tabindex

am i doing something wrong...



Deepak 

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



RE: Repost: Validations in Action Form

2003-09-01 Thread deepaksawdekar
Hi,
What about the setter methods of the action form. They may throw some 
IllegalArgumentException when you are trying to set some of wrong arguments in the 
form. How will you take care it.

Deepak.

-Original Message-
From: Joe @ Team345 [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 30, 2003 7:00 PM
To: Struts Users Mailing List
Subject: Re: Repost: Validations in Action Form


No, IMO you should not do what you outline. Rather, use the "Struts 
Validator Framework" to do validation. It took me a little bit to get 
the first "required" validation to work right. After that though you get 
used to it very fast. It is simple, extensible and your validations are 
not in code, but in XML files. I did find one limitation though. EVERY 
value I use on a form I represent as a String. Then I have the Action 
class validate. If validation proceeds then I do any necessary type 
conversion in the ValueObject.

So if I had a date field (call it startDate) in the form I would have 
accessor methods:

public String getStartDate()

public void setStartDate(String date)

and it my value object I would have accessors for any "derived" types I 
might need:

public java.util.Date getStartDateAsUtilDate()

public java.sql.Date getStartDateAsSQLDate()...

this way you know you can create the date objects from the string when 
you create your value objects because you have passed validation..


hth

And it my Value

Adam Hardy wrote:

> Hi Siriam,
> there are no struts framework rules. There is the MVC framework which 
> you should try to adhere to and not violate, which is why you are 
> using struts, right?
>
> There are areas in struts where the adherence to MVC design, or even 
> OO design, is not 'optimal', caused by the interfaces between model 
> and view, or view and control, or control and model.
>
> It's the same with OO - there are people who say struts should 
> incorporate action classes and form classes so that functionality is 
> encapsulated with its related data.
>
> Somewhere there has to be a compromise for the sake of productivity.
>
> I've done what you outlined below. It works great having the 
> validation checks in the value objects, especially for using nested 
> beans. While it enhances OO design, it does decrease MVC seperation 
> because you now have classes in your model (that's where you send the 
> value objects I presume) where you can call View-layer validation. Not 
> that you would, but it would niggle the purists.
>
> Adam
>
>
>
> On 08/29/2003 01:18 PM sriram wrote:
>
>> Can some please validate this?
>>
>> My application uses Struts Action Form.
>> I am also using Value Objects.
>> I am not doing validations using validations.xml and 
>> validator-rules.xml. I'm performing simple validations on server side 
>> as follows:
>>
>> Can some one please check the below code and tell me if what I am 
>> doing is correct?
>>
>> In Action Form "validate" method, the code as follows:
>>
>> = code in validate method of ActionForm ==
>>
>> ActionErrors errs = new ActionErrors();
>> MyValues val = new MyValues();
>>
>> try {
>> val.setInputField(inputField_);
>> } catch (IllegalArgumentException ex) {
>> errs.add(FLD_INPUT_FIELD,new 
>> ActionError("myviewform.error_input_field",ex.getMessage()));
>> }
>>
>> = code in Value Object - MyValues =
>>
>> public void setInputField(String val) {
>> if (val==null || val.length()==0) throw new 
>> IllegalArgumentException("Illegal null parameter passed to 
>> setInputField");
>> if (val!=null && val.length()>100) // max length of this field is 100
>> throw new IllegalArgumentException("Illegal parameter value too long 
>> passed to setInputField,value="+val);
>> inputField_=val;
>> }// end of setInputField
>>
>> 
>>
>> With the above code, can I say that the validations are written in 
>> "validate" method of ActionForm? Someone mentioned that since I'm 
>> performing actual validations in MyValues, the validations are not 
>> being done in ActionForm, and so it does not follow Struts Framework 
>> rules. Is this true? Please clarify.
>>
>>
>>
>


-
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

2003-08-26 Thread deepaksawdekar
Thanks a lot navjot. I will try this.


Deepak .

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2003 11:20 AM
To: Struts Users Mailing List
Subject: RE: Design question


|
|Now my questions are :
|1> I am doing write something wrong.

It's better not to club two logically different business process handlers.
I guess you want to reduce the number of Action Classes to be created. If
yes, follow this way




In your action class..

String doWhat = mapping.getParameter();

if("proj".equals(doWhat))
proj.create(dto);
else if("user".equals(doWhat))
user.create(dto);


|2> Validation errors are to be send to called jsp. Like validation
|error for create user has to be send to create user jsp, for that
|i need to dynamically change the value of input in my action
|mapping, how to do this.
|3> Since the form beans are different for each jsp can i
|dynamically change the formbean of the actionmapping
|4> can you suggest some alternate method so that i can not have to
|do copy past of my code in execute method of action class.

If you follow my advice on 1, you need not to bother about that.
HTH
navjot Singh

PS - may i know where are you located?


-
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 disable a component based on bean property.

2003-08-26 Thread deepaksawdekar
Hi All,
I need to disable the html:text component based on some property of bean. Any pointer 
how can i achive this.

Thanks and Regards
Deepak .

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



Design question

2003-08-25 Thread deepaksawdekar
Hi,
We are developing a application which will have number of create screens, as follows :
Create Technology screen,
Create Project screen,
Create user screen.
etc

Each screen will have a asssociated formbean as follows.
TechnologyForm  for Create Technology screen  
ProjectForm for Create Project screen,
UserForm for Create user screen
etc.

Each form will have the object of underlying dataobject, and each form will have a 
method getDataObject.
e.g. 
Techonology form contains .
.
.
.
.
private TechDBO tech;  # TechDBO is underlying dataobject.
.
.
.
.
TechDBO getDataObject(){
return this.tech;
}
.
.
.
.


execute method will have more or less same code as
.
.
.
dblayer.create(form.getDataObject());
.
.
.
.


So I am planning to club all the create in one action class and forward to appropriate 
jsp as per some parameter by in formbean.

my struts-config.xml will be something like this.






Now my questions are :
1> I am doing write something wrong.
2> Validation errors are to be send to called jsp. Like validation error for create 
user has to be send to create user jsp, for that i need to dynamically change the 
value of input in my action mapping, how to do this.
3> Since the form beans are different for each jsp can i dynamically change the 
formbean of the actionmapping
4> can you suggest some alternate method so that i can not have to do copy past of my 
code in execute method of action class.

TIA
Deepak.

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



RE: Problem build war using Ant

2003-08-25 Thread deepaksawdekar
Thanks a lot. yes it was the problem of ant version only. i was using eclipse plugin 
which support ant 1.5.2. After i installed the separate ant 1.5.4 it works.
Now i have to find the plugin for eclipse which supports ant 1.5.3 or above.


Deepak 

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Monday, August 25, 2003 11:50 AM
To: Struts Users Mailing List
Subject: RE: Problem build war using Ant


have you checked the ANT version?

|-Original Message-
|From: deepaksawdekar [mailto:[EMAIL PROTECTED]
|Sent: Monday, August 25, 2003 10:39 AM
|To: Navjot Singh; Struts Users Mailing List
|Subject: RE: Problem build war using Ant
|
|
|Thanks for the response, 
|My dir strucute is 
|webgui
|   |_ build  #contains the build file
|   |_ classes #Where build stores the class
|   |_ etc  # contains all my config files. 
|   |_ lib  # contains depending jar file like jar files of 
|struts tld etc.
|   |_ pages# contains jsp files
|   |_ src  # contains .java files.
|
|
|Thanks and regards
|Deeapk.
|
|-Original Message-
|From: Navjot Singh [mailto:[EMAIL PROTECTED]
|Sent: Saturday, August 23, 2003 12:21 PM
|To: Struts Users Mailing List; deepaksawdekar
|Subject: RE: Problem build war using Ant
|
|
|hi deepak,
|
|Posting the directory structure would have been great help.
|
|BTW, which version of Ant are you using? If any less than 1.5.3, switch
|RIGHT NOW. Lower version are buggy in terms of getting classes and lib
|tasks.
|
|hth
|Navjot Singh
|
||-Original Message-
||From: deepaksawdekar [mailto:[EMAIL PROTECTED]
||Sent: Friday, August 22, 2003 10:18 PM
||To: Struts Users Mailing List
||Subject: Problem build war using Ant
||
||
||I am using Ant to build my war file. my build file is
||
||
||  
|| 
||   
|| 
||
||  
||  
||
||
||When i run the build only content of pages dir is included, Can
||some one help me to debug tht build file.
||
||Thanks and Regards
||Deepak
||
||-
||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: Problem build war using Ant

2003-08-25 Thread deepaksawdekar
Thanks for the response, 
My dir strucute is 
webgui
|_ build  #contains the build file
|_ classes #Where build stores the class
|_ etc  # contains all my config files. 
|_ lib  # contains depending jar file like jar files of struts tld etc.
|_ pages# contains jsp files
|_ src  # contains .java files.


Thanks and regards
Deeapk.

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 23, 2003 12:21 PM
To: Struts Users Mailing List; deepaksawdekar
Subject: RE: Problem build war using Ant


hi deepak,

Posting the directory structure would have been great help.

BTW, which version of Ant are you using? If any less than 1.5.3, switch
RIGHT NOW. Lower version are buggy in terms of getting classes and lib
tasks.

hth
Navjot Singh

|-Original Message-
|From: deepaksawdekar [mailto:[EMAIL PROTECTED]
|Sent: Friday, August 22, 2003 10:18 PM
|To: Struts Users Mailing List
|Subject: Problem build war using Ant
|
|
|I am using Ant to build my war file. my build file is
|
|
|  
| 
|   
| 
|
|  
|  
|
|
|When i run the build only content of pages dir is included, Can
|some one help me to debug tht build file.
|
|Thanks and Regards
|Deepak
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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



Problem build war using Ant

2003-08-22 Thread deepaksawdekar
I am using Ant to build my war file. my build file is 


  
 
   
 

  
  


When i run the build only content of pages dir is included, Can some one help me to 
debug tht build file.

Thanks and Regards
Deepak

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



Performance of UI for Struts.

2003-08-20 Thread deepaksawdekar
Hi,
Please excuse me for the question but I want to test the performance of my User 
interface developed using struts. Mainly I want to test how much time it takes to load 
the page if execute method of action class doesn't do any thing except forwarding the 
request. 
Is there any tool to do this?
Some pointer on the performance of UI using Struts will be added advantage.


TIA
Deepak


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



mailto in html:link

2003-08-20 Thread deepaksawdekar
I want to send a email on click of some icon.
I am doing this by using mailto in  tag, email id has to be get from a 
property of bean,
jsp is as follows 
..
">

mytag is a customised tag to get a value of key from hashmap.

When i try the above i got the error
org.apache.jasper.JasperException: /pages/myContact.jsp(46,88) equal symbol expected

Am i doing something wrong. Is there any better way to do this..


TIA,
Deepak  

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



validation and setter methods.

2003-08-20 Thread deepaksawdekar
When i submit a form, which method is called first, Validation or setter method of 
formbean.


TIA 
Deepak.

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



mailto in html:link

2003-08-20 Thread deepaksawdekar
I want to send a email on click of some icon.
I am doing this by using mailto in  tag, email id has to be get from a 
property of bean,
jsp is as follows 
..
">

mytag is a customised tag to get a value of key from hashmap.

When i try the above i got the error
org.apache.jasper.JasperException: /pages/myContact.jsp(46,88) equal symbol expected

Am i doing something wrong. Is there any better way to do this..


TIA,
Deepak  

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



RE: no getter method found

2003-08-20 Thread deepaksawdekar
in the method name first character after get or set should be captial, and while 
refering a property in jsp the first character should be small
eg. if you have a bean property as
.
.
.
String lastName;
String getLastName()
{
}
void setLastName()
{
}   
.
.
.

You will refer the property lastname in jsp as 
property="lastName" ..



Deepak 


-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 12:03 AM
To: 'Struts Users Mailing List'
Subject: RE: no getter method found


Try naming your methods
public String getLastname()
and
public void setLastname()

Regards,

Richard


-Original Message-
From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 19, 2003 6:55 AM
To: [EMAIL PROTECTED]
Subject: no getter method found


I have the below in my jsp page

Last Name: 

and this in my ActionForm subclass

private String lastName = null;

  public String getlastname(){
 return this.lastName;
  }

  public void setlastname( String lastName){
 this.lastName = lastName;
  }

But I keep getting the no gett found error message...
No getter method for property lastname of bean
org.apache.struts.taglib.html.BEAN


What should the getter method be called?


--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



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



exception in actionfrom class.

2003-08-19 Thread deepaksawdekar
I am using the containment design patter for the ActionForm.
My action form will look like this.

public final class ContactForm extends ActionForm {
private ContactInfo contactInfo;

public int getContactid() {
return contactInfo.getContactId();
}

public void setContactid(int ContactId) {
this.contactInfo.setContactId(ContactId);
}

public String getTitle() {
return contactInfo.getContactPersInfo().getNameInfo().getTitle();
}

public void setTitle(String Title) {
this.contactInfo.getContactPersInfo().getNameInfo().setTitle(Title);
}
.
.
.
.
.
}

the setter methods throughs some exception. Exceptions will be thrown if there is some 
format validation error. I want to catch this exception and would like to display them 
on the screen, how can i achive this.


Thanks and Regards
deepak

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



Tiles. using action for attribute value.

2003-08-18 Thread deepaksawdekar
I am using tiles Using struts for the normal header, left menu, body and footer page 
layout 


I am using following jsp file to insert the approprate files

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


  
  
   
  


I am getting following error
Exception in:/Header.do] Cannot forward after response has been committed 
Am i doing something wrong. 


Thanks and Regards

Deepak

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



Tiles. using action for attribute value.

2003-08-18 Thread deepaksawdekar
Title: Tiles. using action for attribute value.






I am using tiles Using struts for the page layout 


    



I am using following jsp file to insert the approprate files


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




  

  

   

  




I am getting following error

Exception in:/Header.do] Cannot forward after response has been committed 

Am i doing something wrong. 



Thanks and Regards


Deepak





how to pass property value to javascript

2003-08-15 Thread deepaksawdekar

How to pass the propery value to javascript function.
I am trying to do some thing like this,
I have number of  images in the from, now on click of image i want the name of image 
to set in some session variable. I was not able to set the name of image in to session 
variable directly. So i used the text box to set the session variable. Now i am not 
able to pass the image name onclick of image to javascript which will set that name to 
textbox value.

Can you please suggest some soln. or any pointer to this better.

Thanks in advance

Deepak 

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



property to javascript

2003-08-15 Thread deepaksawdekar
How to pass the propery value to javascript function.
I am trying to do some thing like this,
I have number of  images in the from, now on click of image i want the name of image 
to set in some session variable. I was not able to set the name of image in to session 
variable directly. So i used the text box to set the session variable. Now i am not 
able to pass the image name onclick of image to javascript which will set that name to 
textbox value.

Can you please suggest some soln. or any pointer to this better.

Thanks in advance

Deepak 

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



multiple applicationresources.properties file.

2003-08-14 Thread deepaksawdekar
Can we use mutilple applicationresources.properties files in struts1.1 ? 

Deepak

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



difference between dispatchAction and Action class.

2003-08-14 Thread deepaksawdekar
What the pros and cons of using different Action class instead of one dispatchAction 
class ?



TIA
Deepak

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



RE: RE : multiple applicationresources.properties file.

2003-08-14 Thread deepaksawdekar
Can you please send me some article or examples.

Thanks and Regards
Deepak

-Original Message-
From: Laurent MARQUEZ [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 5:25 PM
To: 'Struts Users Mailing List'
Subject: RE : multiple applicationresources.properties file.


I think yes.


-Message d'origine-
De : deepaksawdekar [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 13 août 2003 13:08
À : [EMAIL PROTECTED]
Objet : multiple applicationresources.properties file.


Can we use mutilple applicationresources.properties files in struts1.1 ?


Deepak

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