RE: [OT] JSP or Velocity

2004-02-28 Thread Navjot Singh
hi,

As far as i am concerned. My prefs are Eclipse and UEdit(designers can use
in combination with other design ides like dreamweaver etc).

See more at http://jakarta.apache.org/velocity/devtools.html

Navjot Singh

>-Original Message-
>From: Andrew Hill [mailto:[EMAIL PROTECTED]
>Sent: Saturday, February 28, 2004 2:15 PM
>To: Struts Users Mailing List
>Subject: RE: [OT] JSP or Velocity
>
>
>Hehe, I love this programmers vs designer concept. Every place Ive worked
>its always the same poor sod (ie: yours truly) who has to do both roles.
>
>...and why is it Im always the only one who sees the advantages of
>monospaced green text on a black background. Darn users always
>wanting their
>proportional fonts, and yucky pastel colours. Garrrgh!
>
>-Original Message-
>From: David Friedman [mailto:[EMAIL PROTECTED]
>Sent: Saturday, 28 February 2004 06:07
>To: Struts Users Mailing List
>Subject: RE: [OT] JSP or Velocity
>
>
>Navjot,
>
>Though I haven't tried Velocity, I like the idea that my stub-pages can be
>easily edited in HTML editors.  How do your manage letting your designers
>alter the JSP layouts?  Do you have them use some (and if so, what is it)
>HTML editor which is (Stuts JSP & EL) aware?
>
>Regards,
>David
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 27, 2004 9:31 AM
>To: Struts Users Mailing List
>Subject: RE: [OT] JSP or Velocity
>
>
>Basically, i use velocity only for email templates and sometimes
>to generate
>other kind of templates from one template where the use of XSLT is not
>appropriate.
>For web templates, that have more complex requirements, i prefer to use
>taglibs. besides el makes life as easy as we may talk in velocity. In
>velocity, to comprehend taglibs, you may have have to write lots of
>velocimacro.
>
>you may ask for another opinion on velocity-user list as well.
>
>>-Original Message-
>>From: Larry Meadors [mailto:[EMAIL PROTECTED]
>>Sent: Friday, 27 February 2004 21:26
>>To: [EMAIL PROTECTED]
>>Subject: Re: [OT] JSP or Velocity
>>
>>
>>>>> [EMAIL PROTECTED] 02/27/04 5:44 AM >>>
>>> I am starting to develop an application using struts and have been
>>> looking round the rest of the Jakarta project and came across the
>>> Velocity project.
>>>
>>> I was interested to see which which people recommended for a relative
>>> newbie
>>
>>After looking at velocity, I am certainly of the opinion that it adds no
>>value over
>>jsp2/jstl. It offers absolutely nothing that the jsp2/jstl combination
>>does not.
>>The only difference is that velocity is a bit more terse (if/else/end
>>instead of
>>//) and that it uses # instead of the <>.
>>
>>It is important to note that I am talking about jsp2 and tomcat 5, not
>>the jsp1 in
>>tomcat 4.
>>
>>A while back I looked in detail at the jsp/velocity comparison on the
>>velocity site.
>>
>>There are several issues with the comparison. The person writing the
>>case study
>>was cleary biased towards velocity and had never even considered JSTL
>>(which
>>in all fairness may not have been available at that time). Looking at
>>the code
>>(both the velocity and jstl versions are below) I think that velocity
>>clearly had
>>an influence on the jsp2/jstl constructs.
>>
>>The first thing I noticed was that the two pages do not do the same
>>thing.
>>The jsp turns off the session (the vm does not). The jsp stores
>>variables that
>>are never used which were factored out in the vm version. The vm version
>>
>>is missing required code (for example, the repCode and urlEvent
>>variables
>>are never defined).
>>
>>The jsp page is also *very* poorly written using scriptlets. You should
>>rarely need
>>to use scriptlets in jsp1/jstl pages, and I suspect with jsp2/jstl, you
>>will not ever
>>*need* to.
>>
>>With struts, you do not need to use  tags either because
>>the controller
>>does that for you.
>>
>>The jsp2/jstl version is a bit more verbose because it is based on xml
>>so you
>>cannot have things like if/else/end because they are unbalanced, but
>>other than
>>that, there are no significant differences.
>>
>>After converting the page to use JSTL and eliminating ALL of the <% %>
>>stuff, we
>>get something more like this:
>>
>>===
>>The JSP version:
>>===
>>>  

RE: [OT] JSP or Velocity

2004-02-27 Thread Navjot Singh
Basically, i use velocity only for email templates and sometimes to generate
other kind of templates from one template where the use of XSLT is not
appropriate.
For web templates, that have more complex requirements, i prefer to use
taglibs. besides el makes life as easy as we may talk in velocity. In
velocity, to comprehend taglibs, you may have have to write lots of
velocimacro.

you may ask for another opinion on velocity-user list as well.

>-Original Message-
>From: Larry Meadors [mailto:[EMAIL PROTECTED]
>Sent: Friday, 27 February 2004 21:26
>To: [EMAIL PROTECTED]
>Subject: Re: [OT] JSP or Velocity
>
>
 [EMAIL PROTECTED] 02/27/04 5:44 AM >>>
>> I am starting to develop an application using struts and have been
>> looking round the rest of the Jakarta project and came across the
>> Velocity project.
>>
>> I was interested to see which which people recommended for a relative
>> newbie
>
>After looking at velocity, I am certainly of the opinion that it adds no
>value over
>jsp2/jstl. It offers absolutely nothing that the jsp2/jstl combination
>does not.
>The only difference is that velocity is a bit more terse (if/else/end
>instead of
>//) and that it uses # instead of the <>.
>
>It is important to note that I am talking about jsp2 and tomcat 5, not
>the jsp1 in
>tomcat 4.
>
>A while back I looked in detail at the jsp/velocity comparison on the
>velocity site.
>
>There are several issues with the comparison. The person writing the
>case study
>was cleary biased towards velocity and had never even considered JSTL
>(which
>in all fairness may not have been available at that time). Looking at
>the code
>(both the velocity and jstl versions are below) I think that velocity
>clearly had
>an influence on the jsp2/jstl constructs.
>
>The first thing I noticed was that the two pages do not do the same
>thing.
>The jsp turns off the session (the vm does not). The jsp stores
>variables that
>are never used which were factored out in the vm version. The vm version
>
>is missing required code (for example, the repCode and urlEvent
>variables
>are never defined).
>
>The jsp page is also *very* poorly written using scriptlets. You should
>rarely need
>to use scriptlets in jsp1/jstl pages, and I suspect with jsp2/jstl, you
>will not ever
>*need* to.
>
>With struts, you do not need to use  tags either because
>the controller
>does that for you.
>
>The jsp2/jstl version is a bit more verbose because it is based on xml
>so you
>cannot have things like if/else/end because they are unbalanced, but
>other than
>that, there are no significant differences.
>
>After converting the page to use JSTL and eliminating ALL of the <% %>
>stuff, we
>get something more like this:
>
>===
>The JSP version:
>===
>   bgcolor="white">
>   
>   
>   Topic: ${meeting.topic}
>
>   var="event">
>   value="${meeting.participation[event.fromId]}" />
>   
>   
>   
>   
>   value="${yapper.participantId}" />
>   color="#00">${yapper.name}:
>   
>   
>   color="#f0">${yapper.name}:
>   
>   
>   href="${event.storedData}">"${event.storedData}" 
>   
>   
>   
>   
>   color="#00">${yapper.name}:
>   value="${yapper.participantId}" />
>   
>   
>   color="#f0">${yapper.name}:
>   
>   
>   href="${event.storedData}">"${event.storedData}" 
>   
>   
>   
>   
>   ${meeting.meetingId}:${repId}
>   
>   
>
>===
>The velocity version:
>===
>   bgcolor="white">
>   
>   
>   Topic: $meeting.getTopic()
>
>   #foreach( $event in $meeting.getStoredEventsIterator() )
>   #set( $yapper =
>$meeting.getParticipation($event.getFromId()) )
>
>   #if( $event.getClass().getName().equals($urlEvent) )
>
>   #if( $repRole.equals($yapper.getRole()) )
>   #set( $repId = $yapper.getParticipantId() )
>   color="$blk">$yapper.getName()
>
>   #else
>   color="$blu">$yapper.getName()
>   #end
>
>   href="$event.getStoredData()">$event.getStoredData() 
>
>   #elseif( $event.getClass().getName().equals($chatEvent) )
>
>   #if($repRole.equals($yapper.getRole()) )
>   #set( $repId = $yapper.getParticipantId() )
>   color="$blk">$yapper.getName()
>
>   #else
>   color="

RE: data transfer from Action class to jsp page

2004-02-25 Thread Navjot Singh
yes, store your BO in request

>-Original Message-
>From: Pradeep, PK [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 25, 2004 10:21 PM
>To: Struts Users Mailing List
>Subject: RE: data transfer from Action class to jsp page
>
>
>Sending the same question again..
>
>
>I have this basic question.
>
>Suppose action class calls some business object and fetches some data
>(say employee detail). How to transfer this data to jsp page which is
>reached through ActionForward?
>
>One way I know is storing the data in session object..is there any
>better/different way
>
>-
>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: Tomcat 4 Compression Filter

2004-02-25 Thread Navjot Singh
put apache in front of tomcat and install mod_gzip with apache.
it will do almost everything you can wish for?

>-Original Message-
>From: Niall Pemberton [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 25, 2004 5:43 PM
>To: Struts User Jakarta
>Subject: Tomcat 4 Compression Filter
>
>
>There is a CompressionFilter class shipped with with Tomcat which 
>compresses the ServletResponse that I'm considering using (we have 
>some remote offices which have slow links):
>
>http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-4.0/webapps/exampl
>es/WEB-INF/classes/compressionFilters/CompressionFilter.java?rev=1.
>8&view=auto
>
>It looks OK to me and seems to work fine when I plug it into my app.
>
>I'm a bit concerned that its only an "example" class rather than 
>standard feature of Tomcat. 
>
>Has anyone used this in a 'live' environment and if so are there 
>any issues or with it or recommendations?
>
>Does anyone have any alternatives that they have deployed?
>
>Niall

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



RE: Status 500

2004-02-24 Thread Navjot Singh
that's exactly what i am saying.
Form bean is created. so far so good. the constructor is there to be
accessible.
Now, it's turn to populate form and there we have a problem. That leads to a
thought that
One the members or it's corresponding method seems to have problem

it would be great help if you could post your Form and request params here.

HTH
Navjot Singh

>-Original Message-
>From: Dixit, Shashank (Cognizant) [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 24, 2004 3:30 PM
>To: Struts Users Mailing List
>Subject: RE: Status 500
>
>
>Hi Navjot
>
>That is what I couldn't point it out.
>When I debugged, the it initializes Form bean and before giving
>call to action class, it is throwing that exception.
>No idea how to trace it.
>
>
>Shashank S. Dixit
>Cognizant Technology Solutions Pvt. Ltd.
>Hinjewadi,
>Pune
>Mobile : 98904 25400
>
>An Obstacle is something you see when you take your eyes off the goal.
>
>
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, 24 February 2004 8:06 PM
>To: Struts Users Mailing List
>Subject: RE: Status 500
>
>
>there's some mismatch happening while struts try to populate the
>form associated with your action. please check there.
>
>
>-Original Message-
>From: Dixit, Shashank (Cognizant) [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 24, 2004 1:48 PM
>To: [EMAIL PROTECTED]
>Subject: Status 500
>
>
>Hello friends
>I am getting following exception when I call a particular action.
>My all other actions are running fine. But for calling this
>particular action, I am getting exception given below. The action
>is derived from DispatchAction class but before the method is
>called exception occures., Pls tell me what can be the error.
>Thanks in adv.
>Exception:
>HTTP Status 500 -
>type Exception report
>message
>description The server encountered an internal error () that
>prevented it from fulfilling this request. exception
>javax.servlet.ServletException: BeanUtils.populate
>at
>org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
>at
>org.apache.struts.action.RequestProcessor.processPopulate(RequestPr
>ocessor.j
>ava:821)
>at
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.
>java:254)
>at
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
>at
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
>at
>com.jpmorgan.ib.bcs.servlet.BCSActionServlet.doPost(BCSActionServle
>t.java:82
>)
>at
>com.jpmorgan.ib.bcs.servlet.BCSActionServlet.doGet(BCSActionServlet
>.java:55)
>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(Ap
>plication
>FilterChain.java:247)
>at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicatio
>nFilterCh
>ain.java:193)
>at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrappe
>rValve.ja
>va:256)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveCont
>ext.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(StandardContex
>tValve.ja
>va:191)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveCont
>ext.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:2417)
>at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve
>.java:180
>)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveCont
>ext.invok
>eNext(StandardPipeline.java:643)
>at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatc
>herValve.
>java:171)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveCont
>ext.invok
>eNext(StandardPipeline.java:641)
>at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve
>.java:172
>)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveCont
>ext.invok
>eNext

RE: Session management

2004-02-24 Thread Navjot Singh
struts has nothing to do with managing sessions. we should better 
talk about servlet containers that handles sessions.

btw, 100 sessions are nothing to worry about :-)

leave the txn mgmt to db layer. use any of the persistence frameworks
that can handles this for you.

>-Original Message-
>From: Parag [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 24, 2004 2:44 PM
>To: Struts Users Mailing List
>Subject: Session management
>
>
>Experts,
>
>We are planning to build an application, for which expected 
>concurrent users
>are ~100. Total usrs being 2000.
>
>Does Struts provide any facilities to manage Sessions on such scale?
>
>Some of the functionality is very data intensive, and would need 
>transaction
>management. What is the prefered way of doing so? Are there any facilities
>in Struts
>
>All your comments are highly appreciated.
>
>Regards
>Parag
>
>*
>Disclaimer
>
>This message (including any attachments) contains 
>confidential information intended for a specific 
>individual and purpose, and is protected by law. 
>If you are not the intended recipient, you should 
>delete this message and are hereby notified that 
>any disclosure, copying, or distribution of this
>message, or the taking of any action based on it, 
>is strictly prohibited.
>
>*
>Visit us at http://www.mahindrabt.com
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: Status 500

2004-02-24 Thread Navjot Singh
there's some mismatch happening while struts try to populate the form
associated with your action.
please check there.


-Original Message-
From: Dixit, Shashank (Cognizant) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 1:48 PM
To: [EMAIL PROTECTED]
Subject: Status 500


Hello friends
I am getting following exception when I call a particular action. My all
other actions are running fine.
But for calling this particular action, I am getting exception given below.
The action is derived from DispatchAction class but before the method is
called exception occures.,
Pls tell me what can be the error.
Thanks in adv.
Exception:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.j
ava:821)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at
com.jpmorgan.ib.bcs.servlet.BCSActionServlet.doPost(BCSActionServlet.java:82
)
at
com.jpmorgan.ib.bcs.servlet.BCSActionServlet.doGet(BCSActionServlet.java:55)
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: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:2417)
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:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:666)
at java.lang.Thread.run(Thread.java:536)
root cause
java.lang.IllegalArgumentException: [EMAIL PROTECTED]
at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
ava:1789)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
ava:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:17
13)
at
org.apache.co

RE: MVC difference

2004-02-23 Thread Navjot Singh

yes, you are right that MVC is a pattern, rather architectural pattern.

Can someone make me clear about the MVC pull and MVC push model and their
pros and cons?

TIA
Navjot Singh


>-Original Message-
>From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 24, 2004 4:06 AM
>To: Struts Users Mailing List
>Subject: Re: MVC difference
>
>
>On Monday 23 February 2004 12:16, Navjot Singh wrote:
>
>No. MVC2 is a Pattern (or to to be more precise: an
>idiom) among others that tells you how to organize
>things best on different architectural layers.
>Considering the Web tier, Struts is about the
>practical implementation of that Pattern in form
>of an Action Servlet serving the Controller task,
>several Views usually made of JSPs plus the
>Model, which Struts does not provide itself,
>but means to interface it via Actions instead.
>That given, the internal changes in the Struts
>design that came with 1.1 didn't affect the
>general MVC picture. As won't 1.2.
>
>HTH,
>-- Chris
>
>> Hi,
>>
>> To the people who care about minute differences in the architecture.
>> My question is
>> "Is there any difference between Struts 1.0 and 1.1 in terms of MVC?"
>>
>> TIA
>> Navjot
>>
>> -
>> 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]



MVC difference

2004-02-23 Thread Navjot Singh
Hi,

To the people who care about minute differences in the architecture. 
My question is 
"Is there any difference between Struts 1.0 and 1.1 in terms of MVC?"

TIA
Navjot

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



RE: urgent please -- XML document reading/parsing through SAX for the given snippet.

2004-02-23 Thread Navjot Singh
create a hashmap object and while you run SAX thru your xml document.

is yourStartElement(), save the tag name currentElement variable.
in characters(), save the characters value to your hash with key as
currentElement.

in the end, your element will filled.
if you multiple such case tags. add them into vector one by one.

but why don't you use digester to traverse your document? any reasons.

hth


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 23, 2004 3:37 PM
>To: [EMAIL PROTECTED]
>Subject: urgent please -- XML document reading/parsing through SAX for
>the given snippet.
>
>
>Hi,
>
>I need to parse an xml document (xml file) using SAX API.
>
>A portion of the .xml file looks as follows (for displaying 1 row of
>information).
>
>
>  Abrao I. Grynglas
>  This is the subject of email
>  Yes
>  Document Open
>  16-Sep-03
>  High
>
>
>I use the following java source code to do the same.
>*
>class MyHandler extends DefaultHandler
>{
>  private Set Cases = new TreeSet();
>  private String strCase = "";
>  public MyHandler(){}
>  public void startElement(String namespaceURI,String localname,String
>rawname,Attributes atts) throws SAXException
>  {
>if (localname.equals("case"))
>{
>  for (int i = 0; i < atts.getLength(); i++)
>  {
>String attName = atts.getLocalName(i);
>if (attName.equals("id"))
>strCase = atts.getValue(i);
>  }
>}
>  }
>  public void endElement(String namespaceURI,String localname,String
>rawname) throws SAXException
>  {
>if (localname.equals("case"))
>{
>  String thisCase = strCase.toString().trim();
>  Cases.add(thisCase);
>}
>  }
>  public void characters(char [] buf,int offset,int len){
>String partOfCaseName = new String(buf, offset, len);
>  }
>  public Set getCases(){
>return Cases;
>  }
>}
>*
>
>So the above code returns only the attribute values from the first
>main element
>"case".  I would also like to retrieve (using SAX) the values of
>simple elements
>also.  Can anyone guide me how to achieve this, please ?
>
>Thanks and Regards
>S Srikanth
>
>
>
>-
>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: Role based access?

2004-02-18 Thread Navjot Singh
in this case, Form is decalratively saying that it can be accessed only by
"userRole".
Now when you use CMA, every user will be bound to to a role.

RequestController compare the two roles one from user-in-request and other
from
ActionMapping/ActionConfig and continue..

However, you can also override the default behaviour of processRoles and go
your own way.

HTH
Navjot Singh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 8:49 PM
To: Struts Users Mailing List
Subject: Role based access?



Hi Guys,

Struts-config.xml


How do i use this 'roles' attribute to implement role-based access.

Thanks and Regards

Subramaniam Olaganthan
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


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



RE: trubble with session

2004-02-17 Thread Navjot Singh
When the user doesn't accept cookies, session is of no use.
After login, you can fill the data in request object and *forward* the
request.

look into RequestDispatcher.forward()

HTH
Navjot Singh

>-Original Message-
>From: Claudia Woestheinrich [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 17, 2004 2:50 PM
>To: [EMAIL PROTECTED]
>Subject: trubble with session
>
>
>Hello,
>
>I am new. I have Problems with my first Struts Projekt.
>
>After a User is logged in, I show a List of datas. This list I put
>as Object in the session (session.put("list",datas))
>When another side is opend I cant`t read the Parameter from the
>Session, when the User don`t
>accept Cookis in his Browser. In a old the Servlet-Programm, I used
>the Method response.encode... to manage this
>Problem. But in Struts I use in the Action-Class
>actionMappping.findForwar("sucess") and der URL is definied in
>the Struts config. How can I give the SessionId with? Or how can I
>manage  this Problem?
>
>Sorry, My English perfect.
>
>Thanks
>Claudia
>
>
>-
>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] Case insensitive Map keys [Results]

2004-02-16 Thread Navjot Singh
pperCaseMap extends HashMap {
>   public Object put(Object key, Object value) {
>   return super.put(key.toString().toUpperCase(),
>value);
>   }
>
>   public Object get(Object key) {
>   return
>super.get((key.toString()).toUpperCase());
>   }
>   }
>
>   private  static class TreeMapUpperCaseMap extends TreeMap {
>   public TreeMapUpperCaseMap() {
>   super(String.CASE_INSENSITIVE_ORDER);
>   }
>   }
>
>   private static class IgnoreCaseIntegerMap extends HashMap {
>   public Object put(Object key, Object value) {
>   return
>super.put(this.generateKey(key.toString()), value);
>   }
>
>   public Object get(Object key) {
>   return
>super.get(this.generateKey(key.toString()));
>   }
>
>   private Object generateKey(String str) {
>
>   int len = str.length();
>   int h=0;
>   char val[] = str.toCharArray();
>   char c;
>   for (int i = 0; i < len; i++) {
>   c=val[i++];
>   if(c>=97 && c <=122)
>   c-=32;
>
>   h = 31*h + c;
>   }
>   return new Integer(h);
>   }
>   }
>
>   private static class IgnoreCaseBitMap extends HashMap {
>   public Object put(Object key, Object value) {
>   return
>super.put(this.generateKey(key.toString()), value);
>   }
>
>   public Object get(Object key) {
>   return
>super.get(this.generateKey(key.toString()));
>   }
>
>   private Object generateKey(String str) {
>   int len = str.length();
>   int h=0;
>   char val[] = str.toCharArray();
>   for (int i = 0; i < len; i++) {
>   h = 31*h + (val[i++]&223);
>   }
>   return new Integer(h);
>   }
>   }
>
>}
>
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Sábado, 14 de Febrero de 2004 03:16 a.m.
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: RE: [OT] Case insensitive Map keys
>
>
>hi,
>
>seems like you are ready to go down to bits. my 2 cents for you to try
>
>==> convert string to array of bytes.
>
>1. AND every byte with 1101. all will give you same output. OR 2.
>shift left the every byte by 3 bits.
>
>keep pushing the resulting byte to another array.
>create string again of those bytes.
>
>Saves you 2 relations operator, one condiiton checking, one
>subtraction-assign. object creation is same. you create Integer. I
>create String.
>
>please let us know if you gain some performance.
>
>
>>-Original Message-
>>From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
>>Sent: Friday, February 13, 2004 7:08 PM
>>To: 'Struts Users Mailing List'
>>Subject: RE: [OT] Case insensitive Map keys
>>
>>
>>I'm trying the following:
>>
>>  public class KeyGeneratedMap extends HashMap {
>>  public Object put(Object key, Object value) {
>>  return
>>super.put(this.generateKey(key.toString()), value);
>>  }
>>
>>  public Object get(Object key) {
>>  return
>>super.get(this.generateKey(key.toString()));
>>  }
>>
>>  /**
>>  * This generates an integer object for Strings and are
>>case insensitive, that is
>>  * Hello and heLLO generate the same Integer object value
>>  */
>>  private Object generateKey(String str) {
>>  int len = str.length();
>>  int h=0;
>>  char val[] = str.toCharArray();
>>  char c;
>>  for (int i = 0; i < len; i++) {
>>  c=val[i++];
>>  if(c>=97 && c <=122)
>>  c-=32;
>>
>>  h = 31*h + c;
>>  }
>>  return new Integer(h);
>>  }
&

RE: [OT] Case insensitive Map keys

2004-02-13 Thread Navjot Singh
hi,

seems like you are ready to go down to bits. my 2 cents for you to try

==> convert string to array of bytes.

1. AND every byte with 1101. all will give you same output.
OR
2. shift left the every byte by 3 bits.

keep pushing the resulting byte to another array.
create string again of those bytes.

Saves you 2 relations operator, one condiiton checking, one
subtraction-assign. object creation is same. you create Integer. I create
String.

please let us know if you gain some performance.


>-Original Message-
>From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 13, 2004 7:08 PM
>To: 'Struts Users Mailing List'
>Subject: RE: [OT] Case insensitive Map keys
>
>
>I'm trying the following:
>
>   public class KeyGeneratedMap extends HashMap {
>   public Object put(Object key, Object value) {
>   return
>super.put(this.generateKey(key.toString()), value);
>   }
>
>   public Object get(Object key) {
>   return
>super.get(this.generateKey(key.toString()));
>   }
>
>   /**
>   * This generates an integer object for Strings and are
>case insensitive, that is
>   * Hello and heLLO generate the same Integer object value
>   */
>   private Object generateKey(String str) {
>   int len = str.length();
>   int h=0;
>   char val[] = str.toCharArray();
>   char c;
>   for (int i = 0; i < len; i++) {
>   c=val[i++];
>   if(c>=97 && c <=122)
>   c-=32;
>
>   h = 31*h + c;
>   }
>   return new Integer(h);
>   }
>   }
>
>This by now is three times faster than using toUpperCase for storing and
>retrievinig items from the hash. What do you think?
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Viernes, 13 de Febrero de 2004 02:53 a.m.
>To: Struts Users Mailing List
>Subject: RE: [OT] Case insensitive Map keys
>
>
>oops!! thanks for correcting me freddy.
>
>well in that case, if you map is not modified frequently, try the
>FastHashMap from the Apache Commons. either you override and read and
>write your own.
>
>>-Original Message-
>>From: Villalba Arias, Fredy [BILBOMATICA]
>>[mailto:[EMAIL PROTECTED]
>>Sent: Thursday, February 12, 2004 5:50 PM
>>To: Struts Users Mailing List
>>Subject: RE: [OT] Case insensitive Map keys
>>
>>
>>Navjot,
>>
>>I believe this is exactly what Guillermo CLEARLY stated he had already
>>tried (and is not efficient enough for him).
>>
>>If you had taken a little bit longer and read carefully, then maybe
>>you'd have noticed.
>>
>>Regards,
>>Freddy.
>>
>>-Mensaje original-
>>De: Navjot Singh [mailto:[EMAIL PROTECTED]
>>Enviado el: jueves, 12 de febrero de 2004 13:14
>>Para: Struts Users Mailing List; [EMAIL PROTECTED]
>>Asunto: RE: [OT] Case insensitive Map keys
>>
>>yes. here it is.
>>
>>public CIMap extends HashMap
>>{
>>
>>  public Object get(String key)
>>  {
>>  return super.get(key.toLowerCase());
>>  }
>>
>>  public Object put(String key, Object value)
>>  {
>>  super.put(key.toLowerCase(),value);
>>  }
>>}
>>
>>This was simple implementation. By the time you ask the Q and wait for
>>reply. you could have written on your own.
>>
>>Navjot Singh
>>
>>
>>>-Original Message-
>>>From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
>>>Sent: Thursday, February 12, 2004 5:24 PM
>>>To: 'Struts Users Mailing List'
>>>Subject: [OT] Case insensitive Map keys
>>>
>>>
>>>Hi:
>>>Does anyone know an implementation of Map where keys are String and
>>>case insensitive? I want to do this:
>>>
>>>map.put("propertyName", "DATA");
>>>
>>>And then, I should be able to get the value like this:
>>>Object obj = map.get("PROPERTYNAME");
>>>
>>>Or like this:
>>>Object obj = map.get("propertyname"); //or whatever. case insensitive.
>>>
>>>We tried using toUppercase when putting and toUppercase when getting,
>>>and using equalsIgnoreCase but this is not 

RE: newlines

2004-02-13 Thread Navjot Singh
can you replace the \n to  before sending to jsp 

>-Original Message-
>From: Turner Benjamin [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 13, 2004 2:33 PM
>To: Struts-User (E-mail)
>Subject: newlines
>
>
>hello,
>
>i looked in the archives about this problem but couldn't find 
>anything useable. 
>
>i have text data which contains newlines (\n) which has been 
>entered via textarea's. on a different page i wish to present this 
>data with the newlines converted to 's. i however don't want 
>to turn the filter="" option of bean:write off, since this would 
>enable possible misformatting if the user were to enter html data.
>
>is there a clean solution to this?  is also not an option 
>since this makes for lines being endlessly long.
>
>tia,
>
>Ben
>
>-
>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: Hi

2004-02-13 Thread Navjot Singh
i could have given you my test case if i had not thrown away earlier.
but you ca write a test case that create 10 threads and open up 100
connections. don's close.

if your max-pool-size was set to 500 and pool can expand. then in the end,
the total open connections returned from the pool should be 1000.

then just changes the test case to close connections. now in the end <=500
conns should be there.

May be other people know of some tool to do that? i know JMeter but i have
not used that.


>-Original Message-
>From: hhlow [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 13, 2004 3:04 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Hi
>
>
>Hi
>
>i am using the "pool implementation using apache commons pool and dbcp"
>how can i test if it works?
>
>clement
>- Original Message -
>From: "Navjot Singh" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Sent: Friday, February 13, 2004 2:14 PM
>Subject: RE: Hi
>
>
>> any of the 3 will do
>>
>> 1. configure the data source in tomcat
>> 2. configure the data source in struts
>> 3. write your own pool implementation using apache commons pool and dbcp
>>
>> hth
>> Navjot Singh
>>
>> >-Original Message-
>> >From: Vishal Arora [mailto:[EMAIL PROTECTED]
>> >Sent: Friday, February 13, 2004 11:31 AM
>> >To: [EMAIL PROTECTED]
>> >Subject: Hi
>> >
>> >
>> >Please  anyone knowing how to use the Connection Pooling in struts or
>> >Tomcat5.0 with Informix as database help me out..
>> >
>> >
>> >Thanks in advance.
>> >
>> >
>> >-
>> >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: Hi

2004-02-12 Thread Navjot Singh
any of the 3 will do

1. configure the data source in tomcat
2. configure the data source in struts
3. write your own pool implementation using apache commons pool and dbcp

hth
Navjot Singh

>-Original Message-
>From: Vishal Arora [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 13, 2004 11:31 AM
>To: [EMAIL PROTECTED]
>Subject: Hi
>
>
>Please  anyone knowing how to use the Connection Pooling in struts or
>Tomcat5.0 with Informix as database help me out..
>
>
>Thanks in advance.
>
>
>-
>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: multiple struts-config files

2004-02-12 Thread Navjot Singh
Hi

>I've read some mails about multiple struts-config files, but still
>have some questions:
>-what's the advantage of using multiple struts-config files in one
>application ?  Is it better for performance ?

Rather than performace issue, it's more of teams-developing-on-diff-modules
and project-maintainance issue.

>-how can I call a forward or action in my second struts-config
>from within a jsp ?

you know jsp:forward tag. the url in that tag needs to have module name and
path under than module name defined.

>-can I call a forward or action in one struts-config from within
>another struts-config ?

yes, see module switching in docs.

HTH
Navjot Singh

>Any help is very appreciated
>Koen
>
>
>
>
>Find what you are looking for with the Lycos Yellow Pages
>http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/de
>fault.asp?SRC=lycos10
>
>-
>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] Case insensitive Map keys

2004-02-12 Thread Navjot Singh
oops!! thanks for correcting me freddy.

well in that case, if you map is not modified frequently, try the
FastHashMap from the Apache Commons.
either you override and read and write your own.

>-Original Message-
>From: Villalba Arias, Fredy [BILBOMATICA] [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 5:50 PM
>To: Struts Users Mailing List
>Subject: RE: [OT] Case insensitive Map keys
>
>
>Navjot,
>
>I believe this is exactly what Guillermo CLEARLY stated he had
>already tried (and is not efficient enough for him).
>
>If you had taken a little bit longer and read carefully, then
>maybe you'd have noticed.
>
>Regards,
>Freddy.
>
>-Mensaje original-
>De: Navjot Singh [mailto:[EMAIL PROTECTED]
>Enviado el: jueves, 12 de febrero de 2004 13:14
>Para: Struts Users Mailing List; [EMAIL PROTECTED]
>Asunto: RE: [OT] Case insensitive Map keys
>
>yes. here it is.
>
>public CIMap extends HashMap
>{
>
>   public Object get(String key)
>   {
>   return super.get(key.toLowerCase());
>   }
>
>   public Object put(String key, Object value)
>   {
>   super.put(key.toLowerCase(),value);
>   }
>}
>
>This was simple implementation. By the time you ask the Q and wait for
>reply. you could have written on your own.
>
>Navjot Singh
>
>
>>-Original Message-
>>From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, February 12, 2004 5:24 PM
>>To: 'Struts Users Mailing List'
>>Subject: [OT] Case insensitive Map keys
>>
>>
>>Hi:
>>Does anyone know an implementation of Map where keys are String and case
>>insensitive?
>>I want to do this:
>>
>>map.put("propertyName", "DATA");
>>
>>And then, I should be able to get the value like this:
>>Object obj = map.get("PROPERTYNAME");
>>
>>Or like this:
>>Object obj = map.get("propertyname"); //or whatever. case insensitive.
>>
>>We tried using toUppercase when putting and toUppercase when getting,
>>and using equalsIgnoreCase but this is not as efficient as we need.
>>May there be a way to calculate a hash for strings in upper or lower
>>case to result in the same value?
>>
>>Thanks in advance.
>>
>>Guillermo.
>>
>>
>>NOTA DE CONFIDENCIALIDAD
>>Este mensaje (y sus anexos) es confidencial, esta dirigido
>>exclusivamente a las personas direccionadas en el mail y puede
>>contener informacion (i)de propiedad exclusiva de Interbanking
>>S.A. o (ii) amparada por el secreto profesional. Cualquier opinion
>>en el contenido, es exclusiva de su autor y no representa
>>necesariamente la opinion de Interbanking S.A. El acceso no
>>autorizado, uso, reproduccion, o divulgacion esta prohibido.
>>Interbanking S.A no asumira responsabilidad ni obligacion legal
>>alguna por cualquier informacion incorrecta o alterada contenida
>>en este mensaje. Si usted ha recibido este mensaje por error, le
>>rogamos tenga la amabilidad de destruirlo inmediatamente junto con
>>todas las copias del mismo, notificando al remitente. No debera
>>utilizar, revelar, distribuir, imprimir o copiar este mensaje ni
>>ninguna de sus partes si usted no es el destinatario. Muchas gracias.
>>
>
>
>-
>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.459 / Virus Database: 258 - Release Date: 25/02/2003
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/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]



RE: [OT] Case insensitive Map keys

2004-02-12 Thread Navjot Singh
yes. here it is.

public CIMap extends HashMap
{

public Object get(String key)
{
return super.get(key.toLowerCase());
}

public Object put(String key, Object value)
{
super.put(key.toLowerCase(),value);
}
}

This was simple implementation. By the time you ask the Q and wait for
reply. you could have written on your own.

Navjot Singh


>-Original Message-
>From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 5:24 PM
>To: 'Struts Users Mailing List'
>Subject: [OT] Case insensitive Map keys
>
>
>Hi:
>Does anyone know an implementation of Map where keys are String and case
>insensitive?
>I want to do this:
>
>map.put("propertyName", "DATA");
>
>And then, I should be able to get the value like this:
>Object obj = map.get("PROPERTYNAME");
>
>Or like this:
>Object obj = map.get("propertyname"); //or whatever. case insensitive.
>
>We tried using toUppercase when putting and toUppercase when getting,
>and using equalsIgnoreCase but this is not as efficient as we need.
>May there be a way to calculate a hash for strings in upper or lower
>case to result in the same value?
>
>Thanks in advance.
>
>Guillermo.
>
>
>NOTA DE CONFIDENCIALIDAD
>Este mensaje (y sus anexos) es confidencial, esta dirigido
>exclusivamente a las personas direccionadas en el mail y puede
>contener informacion (i)de propiedad exclusiva de Interbanking
>S.A. o (ii) amparada por el secreto profesional. Cualquier opinion
>en el contenido, es exclusiva de su autor y no representa
>necesariamente la opinion de Interbanking S.A. El acceso no
>autorizado, uso, reproduccion, o divulgacion esta prohibido.
>Interbanking S.A no asumira responsabilidad ni obligacion legal
>alguna por cualquier informacion incorrecta o alterada contenida
>en este mensaje. Si usted ha recibido este mensaje por error, le
>rogamos tenga la amabilidad de destruirlo inmediatamente junto con
>todas las copias del mismo, notificando al remitente. No debera
>utilizar, revelar, distribuir, imprimir o copiar este mensaje ni
>ninguna de sus partes si usted no es el destinatario. Muchas gracias.
>


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



RE: Need help on making Custom Validator work

2004-02-11 Thread Navjot Singh
if it shows you just blank page then something is *null* somewhere

>-Original Message-
>From: Pingili, Madhupal [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 12:49 AM
>To: '[EMAIL PROTECTED]'
>Subject: Need help on making Custom Validator work
>
>
>Hi All,
>I have developed a validator for a special validation.
>I have debug statements in this class and I enabled
>the validator and struts.action classes logging level to DEBUG.
>
>When I type an invalid field in my form and click on "search" button,
>the action gets invoked and I see all the messages in
>log files(from my validator class as well as struts.action classes).
>
>The last message was:
>
>DEBUG (RequestProcessor.java:972) -  Validation failed, returning to
>'/FindDocs.jsp'
>
>After this, I should get the results of 'FindDocs.jsp' in my 
>browser window.
>But I am not getting any response in my browser window. It just hangs.
>
>Can anyone tell me how to find out what's happening here?
> 
>'FindDocs.jsp' has folowing code just like 
>struts-validator.war web app has:
>
>
>   
>   
>   
>  
>   
>   
>
>
>I am using struts 1.1 version.
>
>Reddy Pingili
>
>
>-
>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: forwarding all request to the one JSP

2004-02-11 Thread Navjot Singh
jsp is servlet but servlet is not jsp. hope this point clears the point
here.
you should look into using jsp error page directive if you wish to redirect
errors from jsp page.


>-Original Message-
>From: Bubeník Miroslav [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 11, 2004 10:10 PM
>To: Struts Users Mailing List
>Subject: RE: forwarding all request to the one JSP
>
>
>I know that JSP is servlet.
>But:
>part from web.xml:
>
>error
>/2.jsp--- this should
>be class name, not jsp. Or I'm wrong?
> 
>
>
>
>error
>*
>
>
>
>-Original Message-
>From: Michael McGrady [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 11, 2004 5:36 PM
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: Re: forwarding all request to the one JSP
>
>
>This may be one time where it is worth reminding people that JSPs really
>are Servlets?
>
>At 08:31 AM 2/11/2004, Bubeník Miroslav wrote:
>>Hi,
>>is there any possibility in web.xml how can I forward all request for
>>application XXX to one error JSP (without servlet)?
>>
>>Regards
>>
>>miro
>
>
>
>-
>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] - Request against Session

2004-02-11 Thread Navjot Singh
first some clear thoughts.
1. In html everything is string. it doesn't understand anything else.
2. Session is created the first time the user has sent in a request unless
you have overridden this behavior.
3. If user disables cookies (rare case now a days), storing objects in
session is futile exercise.

Use of session or request varies on requirements basis.

1. Start with first form, collect values, pass as hidden values to second
form and so on
2. Start with first form, collect values, save to session and so on

HTH
Navjot Singh

>-Original Message-
>From: Pani R [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 1:41 AM
>To: Struts Users Mailing List
>Subject: [OT] - Request against Session
>
>
>Hi:
>
>I have a very basic question which is related to a User
>Registration Process. Lets assume the user registration process
>spans across 4 pages. User is obviously not logged in to the
>system and apparently viewing all the content belonging to the public.
>
>Now, when the un-logged user tries to register, where am I suppose
>to store the Registration Values, Session or Request? Which one
>will be the better approach and why?
>
>I'm trying to store it in Request as I thought the Session should
>be created only after completion of the User Registration process
>(obviously I create a session and log him in). But, again, when I
>try to pass the Java object through hidden fields, I get null in
>my action class. Is there any specific way of pass Jabva Objects
>in Hidden Fields?
>
>I appreciate any response.
>
>Regards,
>Pani
>
>
>
>
>Find what you are looking for with the Lycos Yellow Pages
>http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/de
>fault.asp?SRC=lycos10
>
>-
>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: 2 PROBLEMs-Please Help

2004-02-11 Thread Navjot Singh
1. did you check the same property name in your messages.properties file.
2. ActionMapping is not deprecated. Reads the docs again. It saya "would
have been deprecated". in fact, this class has 2 more subclasses.



>-Original Message-
>From: f f [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 12, 2004 8:26 AM
>To: [EMAIL PROTECTED]
>Subject: 2 PROBLEMs-Please Help
>
>
>Hi gurus,
>I have 2 problems(or may be 2 bug reports) :
>
>1. The point is IT CAN'T SAVE ERRORS !
>Here is some relevant codes(some of them are simplified)
>===
>from TrySubmitOrderAction.java(on execute method) :
>  // if object under the name found so use it, otherwise create
>one, and put it on
>  // session.
>  ShoppingCartLocal cart=ShoppingCartUtilWeb.getObjectOnSession(session);
>
>  /// alternative 1. CODE BELOW IS THE BUG
>  if(cart.isEmpty()){
> System.out.println("Cart is Empty");
>   errors.add(ActionErrors.GLOBAL_ERROR,new
>ActionError("errors.cartIsEmtpy"));
>  }
>  if(!errors.isEmpty()){
>   saveErrors(request,errors);
>   System.out.println("errors saved");
>   return mapping.findForward("failure"); // forward to /common/error.jsp
>  }
>   CODE ABOVE IS THE BUG
>   alternative 2. IF ALTERNATIVE 1 can't save errors !
>  /**
>  if(cart.isEmpty()){
>   return mapping.findForward("failureCartIsEmpty"); // forward to
>/common/error.jsp
>  }
>  */
>
>from /common/error.jsp :
><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="h" %>
>
><%-- more jsp && html tags --%>
>
>from console :
>INFO  [TilesRequestProcessor] Tiles definition factory found for
>request processor ''.
>INFO  [STDOUT] Cart is Empty  << LOOK A THIS
>INFO  [STDOUT] errors saved   << AND THIS TOO
>INFO  [PropertyMessageResources] Initializing,
>config='org.apache.struts.taglib.html.LocalStrings', returnNull=true
>from server.log :
>DEBUG [org.apache.struts.action.RequestProcessor] Processing a
>'GET' for path '/trySubmitOrder'
>DEBUG [org.apache.struts.action.RequestProcessor]  Setting user locale 'en'
>DEBUG [org.apache.struts.util.RequestUtils]  Looking for
>ActionForm bean instance in scope 'request' under attribute key
>'SubmitOrderForm'
>DEBUG [org.apache.struts.util.RequestUtils]  Creating new
>ActionForm instance of type 'proj.web.form.SubmitOrderForm'
>DEBUG [org.apache.struts.util.RequestUtils]  --> {SubmitOrderForm :  }
>DEBUG [org.apache.struts.action.RequestProcessor]  Storing
>ActionForm bean instance in scope 'request' under attribute key
>'SubmitOrderForm'
>DEBUG [org.apache.struts.action.RequestProcessor]  Populating bean
>properties from this request
>DEBUG [org.apache.struts.action.RequestProcessor]  Looking for
>Action instance for class proj.web.action.TrySubmitOrderAction
>DEBUG [org.apache.struts.action.RequestProcessor]   Creating new
>Action instance
>INFO  [STDOUT] Cart is Empty
>INFO  [STDOUT] errors saved
>DEBUG [org.apache.struts.tiles.TilesRequestProcessor]
>processForwardConfig(/common/error.jsp, false)
>DEBUG [org.apache.struts.tiles.xmlDefinition.I18nFactorySet] Can't
>open file '/WEB-INF/tiles-config_en.xml'
>DEBUG [org.apache.struts.tiles.TilesRequestProcessor]
>'/common/error.jsp' - processed as uri
>DEBUG [org.apache.struts.action.RequestProcessor]
>processForwardConfig(ForwardConfig[name=failure,path=/common/error.
>jsp,redirect=false,contextRelative=false])
>
>from struts-config.xml
>I don't specify the input attribute because It needs no validation.
>  path="/trySubmitOrder"
>  type="proj.web.action.TrySubmitOrderAction"
>  name="SubmitOrderForm"
>  scope="request"
>  unknown="false"
>  validate="false"
>>
>  name="success"
>path="/order/orderPage.jsp"
>redirect="false"
>  />
>  name="failure"
>path="/common/error.jsp"
>redirect="false"
>  />
>  name="failureCartIsEmtpy"
>path="/failureCartIsEmtpyInserter.jsp" // indirectly
>insert /common/error.jsp,
>redirect="false"
>  />
>
>===
>fortunately threre is only one strange Action like this.
>note : don't criticize my System.out.println-s ,please. I've tried
>Log4J but I can't configure it to print log to the console on JBoss.
>
>2. Both ActionMapping and ActionForward are deprecated, so I
>replaced ALL ActionForward to ForwardConfig, and ActionMapping to
>ActionConfig on my source files.
> And my report is ..  why ActionForward
>execute(ActionMapping,ActionForm,HttpServletRequest,HttpServletResponse)
> is not deprecated and subtituded with :
> ForwardConfig execute
>ActionConfig,ActionForm,HttpServletRequest,HttpServletResponse)
> or other similar method.
>  At last, I had to undo ALL of my changes.
>
>Thanks for your answers,
>Fredrich.
>
>
>
>-
>Do you Yahoo!?
>Yahoo! Finance: Get your refund fast by filing online


-

RE: Config issue

2004-02-11 Thread Navjot Singh
this can happen only when you have gannett (first )as context name 
AND
gannett (second one) as module name.

>-Original Message-
>From: news [mailto:[EMAIL PROTECTED] Behalf Of Sam
>Sent: Thursday, February 12, 2004 9:34 AM
>To: [EMAIL PROTECTED]
>Subject: Config issue
>
>
>Greetings,
>
>I'm a STRUTS newbie and am having a problem I can't seem to solve, 
>searched everywhere I can think of and haven't found an answer.
>
>I have STRUTS 1.1 running with Tomcat 5.0.18 and am 
>having a URI context issue.  All of my html form actions 
>are coming out with the wrong URI -- should be "/gannett/login" 
>but are coming out as "/gannett/gannett/login" duplicating the prefix.
>
>Any ideas out there?  Following is my config.
>
>Thanks,
>
>Sam
>
>web.xml snippet:
>
>
>   Gannett Web Application
>
>gannett
>
>  org.apache.struts.action.ActionServlet
>
>
>   config
>   /WEB-INF/struts-config.xml
>
>
>   debug
>   4
>
>
>   detail
>   4
>
>1
>
>
>   gannett
>   /gannett/*
>
>
>Struts-config:
>   
>  path="/login"
>   input="/login.jsp"
>   name="loginForm"
>   scope="request"
>   type="com.dimeta.security.LoginAction"
>   validate="false">
>   redirect="true"/>
>   redirect="true"/>
>   
>
>HTML for login.jsp:
>
>
>
>HTML source from browser:
>
>
>
>
>-
>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: Orkut

2004-02-08 Thread Navjot Singh
count me in

>-Original Message-
>From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich
>Sent: Monday, February 09, 2004 9:46 AM
>To: [EMAIL PROTECTED]
>Subject: Orkut
>
>
>If you want to join Struts in Orkut Social Network send me an e-mail 
>saying so.
>
>.V
>(if you do not know what it is don't worry)
>
>
>-
>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: Making the fields non editable dynamically using a form bean element

2004-02-02 Thread Navjot Singh
guess there is some attribute called readonly for html:text. set that to
true.

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Monday, February 02, 2004 4:06 PM
>To: [EMAIL PROTECTED]
>Subject: Making the fields non editable dynamically using a form bean
>element
>
>
>
>
>Hi ppl,
>
>
>I have a situation where I do not want the user to edit the fields if
>the history record flag in the form bean is true.
>Can you suggest me how to go about it. Can I use a form bean element
>(java.lang.Boolean/String) to disable a  dynamically
>depending on its value.
>
>If yes then how can I do it?
>Thanks a ton in advance
>Regards
>
>Anant Parnami
>
>
>
>Confidentiality Notice
>The information contained in this electronic message and any
>attachments to this message are intended
>for the exclusive use of the addressee(s) and may contain
>confidential or privileged information. If
>you are not the intended recipient, please notify the sender at
>Wipro or [EMAIL PROTECTED] immediately
>and destroy all copies of this message and any attachments.
>
>-
>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: Is it possible to deploy a struts 1.1 application in Tomcat 5.x?

2004-01-22 Thread Navjot Singh
I am successfully running my Application based on
Struts + Tiles + Taglibs (el also) seamlessly.

No probs so far.

>-Original Message-
>From: Smith, Darrin [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 22, 2004 6:55 PM
>To: 'Struts Users Mailing List'
>Subject: RE: Is it possible to deploy a struts 1.1 application in Tomcat
>5.x?
>
>
>It's working for me using an old example, but I did replace some of the jar
>files with the latest struts version.
>
>Darrin
>
>-Original Message-
>From: Ingvar Larsson [mailto:[EMAIL PROTECTED]
>Sent: Thursday, January 22, 2004 6:41 AM
>To: [EMAIL PROTECTED]
>Subject: Is it possible to deploy a struts 1.1 application in Tomcat
>5.x?
>
>
>Hello all!
>
>I have tried to deploy several struts applications in Tomcat 5.0.x but
>failed so far.
>One of them is the struts-examples.war distrubted with the struts 1.1
>package.
>
>I guess it all depends on that struts uses JSP 1.2 and Tomcat 5 implements
>JSP 2.0.
>
>I have searched an answer for this in faq:s and several archives
>but did not
>find
>anything.
>
>So, please! Does anyone of you know if it is possible to deploy and run a
>web
>application using struts in Tomcat 5. And if it is what steps should be
>taken to
>get it to work?
>
>Thanks
>Ingvar
>
>-
>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: XML and JSP

2004-01-20 Thread Navjot Singh
pls look into xml taglibs at apache's website

>-Original Message-
>From: Prashanth.S [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 20, 2004 2:36 PM
>To: [EMAIL PROTECTED]
>Subject: XML and JSP
>
>
>Hi all,
>can anyone tell me a convinient way to display,add delete elements 
>in a xml file from jsp???
> 
>Thanks
>prashanth
>
>
>-
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

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



RE: problems w/ logging.. again

2004-01-19 Thread Navjot Singh
if you are using jdk 1.4 then why don't you switch over to JDK logging? No
configuration issues here as you might face with log4j.

Well it's just a suggestion, as i myself use JDK logging in some projects
and log4j in some.

btw, in struts 1.1, i don't think debug param plays any role.

regards
Navjot Singh

>-Original Message-
>From: Adam L [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, January 20, 2004 11:09 AM
>To: Struts Users Mailing List
>Subject: problems w/ logging.. again
>
>
>I've scoured the archives. I"ve tried a million different
>log4j.properties configurations, some with .xml, some with
>commons-logging.properties.  I've read the links to the apache
>site that seem to focus mainly on how to use logging from the
>programmatic aspect (and had no luck with the examples provided on
>the configuration aspect).
>
>in theory, these changes should take hold when i bounce the
>application (touch web.xml), rather than the entire app server.. correct?
>
>I'm beginning to wonder if it's a configuration issue elsewhere.
>
>jdk is 1.4.2, jboss 3.0.8/jetty, struts 1.1.
>
>in my web.xml i've set the debug parm on ActionServlet to 2, 9, 99, 999
>in struts-config.xml, for the controller,  i've set debug to 2,9,99,999
>
>i cut and paste examples in the archives claiming to remove
>"00:24:09,816 INFO  [PropertyMessageResources] Initializing,
>config='org.apache.struts.taglib.html.LocalStrings',
>returnNull=true" from the logs.. and they don't.
>
>I've set my log levels to WARN, DEBUG, INFO.. and see no changes.
>
>
>What I'm trying to achieve is the debug info from the workflow
>extension controller to aid in debugging problems in my workflow,
>as well as turn off some of the extraneous struts messages.
>
>If someone would please be willing to hold my hand and guide me,
>my quickly receding hairline and I would be in great appreciation.
>
>thank you.


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



RE: Querystring builder

2004-01-05 Thread Navjot Singh
oops, it's m.get(key).toString();

sometimes it happens in hurry ;-)


>-Original Message-
>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 2:50 PM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>THANK YOU SOOO MUCH for providing such detail code in response.
>
>One of the lines in the iterating function:
>
>   nvString.append(this.getString(key) + "&");
>What's the this and the getString suppose to be? Should it be the
>map.get function?
>
>Rgds,
>Patrick.
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED] 
>Sent: Monday, January 05, 2004 4:44 PM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>hi,
>
>Yes, i was referring to copyProperties().
>
>The problem really gets complex if you have nested objects.
>and i doubt if there is any readymade solution to the problem you are
>facing. but with very little effrots you can do this
>
>You can make one and for all. Doesn't seem to be a tough job althought
>bit lengthy :-)
>
>Ok, allow me to get my hands dirty!! and I am not sure if this works
>with collections as you may want. You ca try with collections yourself.
>
>Say you have something like
>
>class A (with corresponding gettter and setter)
>{
>   private B b;
>   private String str;
>}
>
>class B (with corresponding gettter and setter)
>{
>   private String str;
>}
>
>All you need to do is
>
>A a = new A();
>a.setStr("navjot");
>B b = new B();
>b.setStr("singh");
>a.setB(b);
>
>Map m = new HashMap();
>Then call BEanUtils.copyProperties(m,a);
>
>you will get a map filled with key-value pairs
>str=navjot
>b.str=singh
>
>pass this to some function like.
>
>String getQueryStirng(Map m)
>{
>   Iterator nvPairs = m.keySet().iterator();
>   StringBuffer nvString = new StringBuffer("");
>   String key;
>   while(nvPairs.hasNext())
>   {
>   key = (String) nvPairs.next();
>   nvString.append(key + "=");
>   nvString.append(this.getString(key) + "&");
>   }
>   String nv = nvString.toString();
>   if(m.keySet().size() != 0)
>   {
>   return nv.substring(0,nv.lastIndexOf("&"));
>   }
>   return nv;
>}
>
>My this function may not be efficient and does the job you want.
>
>and HURRAY!! you will get QueryString like str=navjot&b.str=singh
>
>hope this helps
>Navjot Singh
>
>**
>Wife sleeping in the middle of night suddenly wakes up and shout.
>"Quick! My husband is back". Man get up and jumps out of window. Then
>realizes "SHIT! I AM the husband."
>**
>
>
>>-Original Message-
>>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>>Sent: Monday, January 05, 2004 12:05 PM
>>To: Struts Users Mailing List
>>Subject: RE: Querystring builder
>>
>>
>>Hi Navjot,
>>I have been working with the BeanUtils things on this problem. Are you 
>>referring to the 'describe' and 'populate' methods? That's what I've 
>>been working on. I am looking for yet a simpler way to do this. I 
>>should say, I wonder if there's an easier way to do this.
>>Let me explain a bit on the situation.
>>Multipage form. The form bean contains other value objects, and these
>>value objects have Collection properties, pointing to another set of
>>Value Objects.
>>
>>That is, in my original formbean:
>>   public MyEJBValueObject getXXX(){...}
>>   public void setXXXs(MyEJBValueObject e){...}
>>In the MyEJBValueObject.java, I have:
>>   public Collection getYYYs(){...}
>>   public void setYYYs(Collecton c){...}
>>And the collection YYY actually is a arraylist of AnotherEJBValueObject
>>
>>With this kind of structure, it's quite tedious to build the 
>>QueryString, Is that right? I suppose I have to iterate thru the Map 
>>described by BeanUtils and go into further levels, and describe again.
>>The worst part is, I don't want to build the 'Form elements' myself.
>>That is,
>>I have to come up with indexed/mapped/mixed name, like,
>>SALES.ITEMS[2].DISCOUNT['MONTHLYSPECIAL'].DISCOUNTRATE
>>Do I have to do that manually?
>>
>>Thanks.
>>Patrick.
>>
>>-Original Message-
>>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>>Sent: Monday, January 05, 2004 2:03 PM
>>To: Struts Users Mail

RE: Querystring builder

2004-01-05 Thread Navjot Singh
hi,

Yes, i was referring to copyProperties().

The problem really gets complex if you have nested objects.
and i doubt if there is any readymade solution to the problem you are
facing. but with very little effrots you can do this

You can make one and for all. Doesn't seem to be a tough job althought bit
lengthy :-)

Ok, allow me to get my hands dirty!! and I am not sure if this works with
collections as you may want. You ca try with collections yourself.

Say you have something like

class A (with corresponding gettter and setter)
{
private B b;
private String str;
}

class B (with corresponding gettter and setter)
{
private String str;
}

All you need to do is

A a = new A();
a.setStr("navjot");
B b = new B();
b.setStr("singh");
a.setB(b);

Map m = new HashMap();
Then call BEanUtils.copyProperties(m,a);

you will get a map filled with key-value pairs
str=navjot
b.str=singh

pass this to some function like.

String getQueryStirng(Map m)
{
Iterator nvPairs = m.keySet().iterator();
StringBuffer nvString = new StringBuffer("");
String key;
while(nvPairs.hasNext())
{
key = (String) nvPairs.next();
nvString.append(key + "=");
nvString.append(this.getString(key) + "&");
}
String nv = nvString.toString();
if(m.keySet().size() != 0)
{
return nv.substring(0,nv.lastIndexOf("&"));
}
return nv;
}

My this function may not be efficient and does the job you want.

and HURRAY!! you will get QueryString like
str=navjot&b.str=singh

hope this helps
Navjot Singh

**
Wife sleeping in the middle of night suddenly wakes up and shout. "Quick! My
husband is back". Man get up and jumps out of window. Then realizes "SHIT! I
AM the husband."
**


>-Original Message-
>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 12:05 PM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>Hi Navjot,
>I have been working with the BeanUtils things on this problem.
>Are you referring to the 'describe' and 'populate' methods? That's what
>I've been working on.
>I am looking for yet a simpler way to do this. I should say, I wonder if
>there's an easier way to do this.
>Let me explain a bit on the situation.
>Multipage form. The form bean contains other value objects, and these
>value objects have Collection properties, pointing to another set of
>Value Objects.
>
>That is, in my original formbean:
>   public MyEJBValueObject getXXX(){...}
>   public void setXXXs(MyEJBValueObject e){...}
>In the MyEJBValueObject.java, I have:
>   public Collection getYYYs(){...}
>   public void setYYYs(Collecton c){...}
>And the collection YYY actually is a arraylist of AnotherEJBValueObject
>
>With this kind of structure, it's quite tedious to build the
>QueryString,
>Is that right? I suppose I have to iterate thru the Map described by
>BeanUtils and go into further levels, and describe again.
>The worst part is, I don't want to build the 'Form elements' myself.
>That is,
>I have to come up with indexed/mapped/mixed name, like,
>SALES.ITEMS[2].DISCOUNT['MONTHLYSPECIAL'].DISCOUNTRATE
>Do I have to do that manually?
>
>Thanks.
>Patrick.
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 2:03 PM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>that should be easy.
>
>BeanUtils gives you the way to populate a MAP object from a Bean. Now al
>you need to do is iterate over keys, form a querystring with each
>name-value pair separated by &.
>
>HTH
>Navjot SIngh
>
>
>>-Original Message-
>>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>>Sent: Monday, January 05, 2004 11:19 AM
>>To: Struts Users Mailing List
>>Subject: RE: Querystring builder
>>
>>
>>What I wanted to do is, at some point during the user is completing a
>>form,(multipage)
>>He can save the form.  Instead of serializing the bean and saving Blob
>>in oracle, I am trying to put things in a QueryString and save the
>>string into oracle.
>>And I want to populate that QueryString into a formbean when the user
>>resumes.
>>
>>Any tools?
>>
>>Thanks a lot.
>>Patrick.
>>
>>-Original Message-
>>From: James Mitchell [mailto:[EMAIL PROTECTED]
>>Sent: Monday, January 05, 2004 12:14 PM
>>To: Struts Users Mailing List
>>Subject: Re: Querystring builder
>>
>>
>>On Mon, 5 J

RE: Querystring builder

2004-01-04 Thread Navjot Singh
that should be easy.

BeanUtils gives you the way to populate a MAP object from a Bean.
Now al you need to do is iterate over keys,
form a querystring with each name-value pair separated by &.

HTH
Navjot SIngh


>-Original Message-
>From: Patrick Cheng [mailto:[EMAIL PROTECTED]
>Sent: Monday, January 05, 2004 11:19 AM
>To: Struts Users Mailing List
>Subject: RE: Querystring builder
>
>
>What I wanted to do is, at some point during the user is completing a
>form,(multipage)
>He can save the form.  Instead of serializing the bean and saving Blob
>in oracle,
>I am trying to put things in a QueryString and save the string into
>oracle.
>And I want to populate that QueryString into a formbean when the user
>resumes.
>
>Any tools?
>
>Thanks a lot.
>Patrick.
>
>-Original Message-
>From: James Mitchell [mailto:[EMAIL PROTECTED] 
>Sent: Monday, January 05, 2004 12:14 PM
>To: Struts Users Mailing List
>Subject: Re: Querystring builder
>
>
>On Mon, 5 Jan 2004, Patrick Cheng wrote:
>
>> Hi All,
>>
>> I have been trying to find helper class to build QueryString from 
>> javabean. Does anyone know of any tool like this?
>
>What are you wanting to do?  Add parameters from your bean?
>
>>
>> Thanks,
>> Patrick.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-- 
>James Mitchell
>Software Developer / Struts Evangelist http://www.struts-atlanta.org
>
>
>-
>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: PDF file in browser

2003-12-23 Thread Navjot Singh
if you can reveal the location of the PDFs on your web server.
Simply put your pdfs under a www/app.com/pdfs/*.pdf and give them links as
you want.

if you wish to maintain some security.
1. send a request to a servlet wit some pdf code or file name
2. open the given file from the file system whereever it is.
3. convert it into stream.
4. push the stream back to browser.

note - must set the appropraite mime/type before you push the stream back.
may be application/pdf or application/x-pdf

HTH
Navjot Singh

>-Original Message-
>From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 24, 2003 10:50 AM
>To: 'Struts Users Mailing List'
>Subject: PDF file in browser
>
>
>
>
>Hi All,
>
>   I am using Struts frame work for our application with Web sphere
>app server.
>We have a some PDF files on the app server .When the user clicks on a
>particular link on
>the JSP page, we have show a pdf  file to the user in a new browser
>window.
>Can any one pls tell me the easier procedure to do this??
>
>Regards
>VasudevRaoGupta
>
>
>Confidentiality Notice
>
>The information contained in this electronic message and any
>attachments to this message are intended
>for the exclusive use of the addressee(s) and may contain
>confidential or privileged information. If
>you are not the intended recipient, please notify the sender at
>Wipro or [EMAIL PROTECTED] immediately
>and destroy all copies of this message and any attachments.
>
>-
>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 and Session

2003-12-12 Thread Navjot Singh
try to keep Session as light as possible. With that in mind, just save all
you need, creator in your case, in Session.

Navjot

>-Original Message-
>From: Caroline Jen [mailto:[EMAIL PROTECTED]
>Sent: Saturday, December 13, 2003 12:15 PM
>To: [EMAIL PROTECTED]
>Subject: Form and Session
>
>
>The statement below in my JSP can write out the value
>of the "creator" property in the articleForm:
>
>
>
>I want to pass the value of the "creator" in a session
>object.  What should I do in my JSP?
>
><%
>String creator = (String)articleForm.getCreator;
>session.setAttribute("creator", creator);
>%>
>
>Or, can I pass articleForm in a session object?
><% session.setAttribute("articleForm", articleForm);%>
>
>
>
>
>__
>Do you Yahoo!?
>New Yahoo! Photos - easier uploading and sharing.
>http://photos.yahoo.com/
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: session.invalidate() throws exception.

2003-12-10 Thread Navjot Singh
one should 
either *catch* Exception OR
use errorPage attribute of <[EMAIL PROTECTED] ...> directive to handle error

HTH
Navjot Singh

>-Original Message-
>From: Antony Paul [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 10, 2003 5:08 PM
>To: struts
>Subject: session.invalidate() throws exception.
>
>
>Hi,
>Calling session.invalidate() in index.jsp throws this exception
>java.lang.IllegalStateException: getAttribute: Session already invalidated
>   at
>org.apache.catalina.session.StandardSession.getAttribute(StandardSe
>ssion.jav
>a:954)
>   at
>org.apache.catalina.session.StandardSessionFacade.getAttribute(Stan
>dardSessi
>onFacade.java:171)
>   at 
>org.apache.struts.taglib.html.FormTag.renderToken(FormTag.java:641)
>   at 
>org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:513)
>   at org.apache.jsp.index_jsp._jspService(index_jsp.java:97)
>   at 
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>
>How to change this behavior. Better if possible to do some house keeping
>before invalidating session like if a valid session and data is present in
>session then go to a certain page.
>
>rgds
>Antony Paul.
>
>
>
>-
>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: When HashMap will replace ActionForm ?

2003-12-10 Thread Navjot Singh
I can't say there will be any move or not.

But MAP backed ActionForms are alreadt there, If you are not interested in
using the actionforms and be contended with just hashmaps. Mostly, not
always, I treat ActionForm as HashMap but with getter setter already
classcasted and defined for properties. not more than that.


>-Original Message-
>From: Antony Paul [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 10, 2003 2:40 PM
>To: struts
>Subject: When HashMap will replace ActionForm ?
>
>
>Hi,
>Is there any move to support HashMap in place of ActionForm ?. I dont
>want to start any argument. I have read a lot on ActionForm in
>this archive.
>
>rgds
>Antony Paul.
>
>-
>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: Error message display in the case of redirect = true

2003-12-09 Thread Navjot Singh
not sure but the logic says that error messages are being stored in the
REQUEST SCOPE and when you set redirect=true, naturally that's a new request
so you won't get the errors set in earlier request.

anybody else?

>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 09, 2003 5:53 PM
>To: Struts Users Mailing List
>Subject: Error message display in the case of redirect = true
>
>
>Hello all,
>I want to display the errors stack provided y Struts in the jsp page using
>the  tag. I am able to display it but the moment I add the
>redirect=true in the action mapping tag I am not able to see the error
>messages.
>
>Please help with it.
>
>Alok Garg
>Polaris Software Lab Ltd.
>( + 91 - 022 - 28290019 Ext. # 1308 )
>
>
>


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



RE: Multiple Config files

2003-12-09 Thread Navjot Singh
>How can I add multiple config file support for struts??


  config
  /WEB-INF/struts-default.xml


  config/ab
  /WEB-INF/struts-ab.xml


>OFF-TOPIC : Does anyone know a cvs mailing list ?
www.cvshome.org

HTH
Navjot Singh

>-Original Message-
>From: Tiago Henrique Costa Rodrigues Alves
>[mailto:[EMAIL PROTECTED]
>Sent: Tuesday, December 09, 2003 6:18 PM
>To: Struts Users Mailing List (E-mail)
>Subject: Multiple Config files
>
>
>Hi,
>
>I am working in a project with many developers,
>sometimes the developers need to change the struts-config.xml file at the
>same time (one developer needs to add a action-form and other developer
>needs to add a form-bean or even make some changes...)
>
>
>Thanks,
>Tiago Henrique C. R. Alves
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: Struts and commons DBCP

2003-12-09 Thread Navjot Singh
tomcat 3? guess that was a stone age :-)

My second question is : do i have to close the connection when may request
is finished ? Does this really close the connection or just free the object
i used, but save the oracle connection open ?

Yes, please close the connection. Actually, this method gets trapped by
PooledConnection interface and the connection will be returned back to the
db pool and it WONT get closed.

HTH
Navjot Singh


RE: File Download?

2003-12-04 Thread Navjot Singh
All you need to use is ServletOutputStream. Check API.

>-Original Message-
>From: Jerry Jalenak [mailto:[EMAIL PROTECTED]
>Sent: Thursday, December 04, 2003 8:35 PM
>To: '[EMAIL PROTECTED]'
>Subject: File Download?
>
>
>I have a need to send generated image files from my web server to a file
>stored on a users local hard drive - ie file download.  I've been googling
>now for awhile and haven't really found anything (maybe my search criteria
>is wrong).  Does anyone have any pointers on the best way to do this?
>
>Thanks!
>
>Jerry Jalenak
>Development Manager, Web Publishing
>LabOne, Inc.
>10101 Renner Blvd.
>Lenexa, KS  66219
>(913) 577-1496
>
>[EMAIL PROTECTED]
>
>
>This transmission (and any information attached to it) may be
>confidential and
>is intended solely for the use of the individual or entity to which it is
>addressed. If you are not the intended recipient or the person
>responsible for
>delivering the transmission to the intended recipient, be advised that you
>have received this transmission in error and that any use, dissemination,
>forwarding, printing, or copying of this information is strictly
>prohibited.
>If you have received this transmission in error, please immediately notify
>LabOne at the following email address: [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: MySQL Driver List

2003-12-03 Thread Navjot Singh
http://www.mysql.com/downloads/api-myodbc-3.51.html

>-Original Message-
>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 03, 2003 10:43 AM
>To: Struts Users Mailing List
>Subject: MySQL Driver List
>
>
>hi ALl
>
>I want to connect my strut application with mySQL database. Can 
>some one refer me to the URL from where i can download the thin 
>drivers for the same.
>
>Thanks in Advance
>
>Regards
>Gary
>

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



RE: Changing SessionId at every request

2003-12-03 Thread Navjot Singh
don't know why do you wish to do so?
but it an be done. Write a filter. pass every request thru that.

1. Fetch the session, expire it. Server will assign new.
2. Fetch the session, don't expire the session, just append a timestamp to
it. set a cookie and use that to maintain session.

HTH
navjot singh

>-Original Message-
>From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, December 03, 2003 11:44 AM
>To: Struts Users Mailing List
>Subject: Changing SessionId at every request
>
>
>HI,
>
>IS it possible to change the Session Id generated by the Web
>Server at every request for the  same client. I wil make it much
>more clear.
>
>Say i have a Servlet running on Tomcat. what i want is when ever
>any User lets assume USER A ask for a request i want to change the
>sessionId server variable which has been gerenrated by the Web
>Server to uniquely identify the client.
>
>Purpose behind doing this is to make every request safe.
>
>
>Any suggections will be higly appreciated.
>
>
>Thanks in Advance
>Gary
>


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



RE: Populating the next Form

2003-11-10 Thread Navjot Singh
surely in ActionB. Filling it's own form is action in itself.

you can parameterized your action to do 2 things
1. fill the formB
2. accepts the submitted formB.

HTH
Navjot Singh

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Tuesday, November 11, 2003 10:54 AM
>To: [EMAIL PROTECTED]
>Subject: Populating the next Form
>
>
>Hi,
>
>I have ActionA and FormA associated to screenA, similarly ActionB and FormB
>associated to screenB. Upon click of a button on ScreenA, I need to
>dispatch ScreenB with some values prefilled. I was wondering where should I
>be writing the logic to populate the FormB for showing those values
>prefilled on ScreenB.
>
>Regards
>Sreekant G
>@ 98404-65630
>
>
>


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



RE: Can I use RequestProcessor to handle session?

2003-11-06 Thread Navjot Singh
yes and probably the right way to do

>-Original Message-
>From: Samanth Athrey [mailto:[EMAIL PROTECTED]
>Sent: Thursday, November 06, 2003 10:35 AM
>To: [EMAIL PROTECTED]
>Subject: Can I use RequestProcessor to handle session?
>
>
>Hello Gurus
>
>I am trying to handle session timeout by extending RequestProcessor. Since
>the processPreprocess(...) method is called before the Action.execute(..)
>method, am trying to add that piece of code to check if the session is
>valid. The problem am facing is, if i return false from this method, the
>requestProcessor will stop processing and return the control back to doGet
>or doPost method in ActionServlet. How do I redirect it to login.jsp or
>index.jsp from there? Any help/tips would be really great.
>
>Thanx.
>Sam
>
>
>
>
>
>
>-
>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: two resource bundles?!

2003-10-30 Thread Navjot Singh
not sure by might be 
Globals.MESSAGES_KEY + prop2


>-Original Message-
>From: Otto, Frank [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 30, 2003 6:01 PM
>To: Struts-User (E-Mail)
>Subject: two resource bundles?!
>
>
>Hi,
> 
>I have defined two properties files in my struts-config.xml:
> 
>
>
> 
>If I want to access the second properties-file in a jsp-page I 
>will use this:
> 
>
> 
>It functions, but how must I use it in action classes?
> 
>// standard bundle
>MessageResources res1 = 
>(MessageRessource)request.getAttribute(Globals.MESSAGES_KEY)
> 
>// second bundle
>MessageResources res2 = (MessageRessource)request.getAttribute(???)
> 
> 
>Has anyone an idea?
> 
> 
> 
>Regards,
> 
>Frank
>

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



RE: redirecting

2003-10-28 Thread Navjot Singh
sendRedirect() is OK to use. Go ahead.

>-Original Message-
>From: ajay brar [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 29, 2003 9:23 AM
>To: [EMAIL PROTECTED]
>Subject: redirecting
>
>
>hi!
>i have to redirect the user from within my action class to an 
>external site.
>i'm currently doing sendRedirect()
>is this better, worse or the same as doing setHeader("Location", "url>")
>
>thanks
>cheers
>Ajay
>
>_
>Hot chart ringtones and polyphonics. Go to  
>http://ninemsn.com.au/mobilemania/default.asp
>
>
>-
>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: multiple resource files in one struts-config file

2003-10-28 Thread Navjot Singh
first pls specify diff keys for diff resource files.
second, pls check if you have specifiied 
errors.header=
line in every property file.

HTH
Navjot Singh

>-Original Message-
>From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 29, 2003 10:07 AM
>To: [EMAIL PROTECTED]
>Subject: multiple resource files in one struts-config file
>
>
>Hi,
>I have a problem with mulitple resource files in one
>struts-config file.
>My definiation in the xml file is as below
>key="org.apache.struts.action.MESSAGE"
>parameter="com.mypackage.maps" />
>key="org.apache.struts.action.MESSAGE"
>parameter="com.mypackage.approval" />
>
>I have some messages in maps.properties file , but in
>my jsp i get error message saying
>Missing message for key "errors.header"
>
>what wrong am i doing?
>Ashish
>
>__
>Do you Yahoo!?
>Exclusive Video Premiere - Britney Spears
>http://launch.yahoo.com/promos/britneyspears/
>
>-
>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: Antwort: [OT] Re: far reaching db question

2003-10-28 Thread Navjot Singh
you should escape your sql data values for mischieveous chars like single
quotes etc.


>-Original Message-
>From: Manuel Lenz [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 28, 2003 4:33 PM
>To: Struts Users Mailing List
>Subject: Antwort: [OT] Re: far reaching db question
>
>
>How do preparedStatements handle single quotes and other injection
>attacks?
>I changed my db-connection from a normal statement-conding into prepared
>statements.
>But the error ist still the same.
>
>Here ist my test-coding:
>Connection conn = null;
>PreparedStatement prepare = null;
>ServletContext context = as.getServletContext();
>boolean ret = false;
>
>try
>{
>DataSource ds = (DataSource)
>context.getAttribute(Action.DATA_SOURCE_KEY);
>
>// Update Banf-Daten
>String sql = "update tab_article set ..."
>System.out.println (sql);
>
>conn = ds.getConnection();
>prepare = conn.prepareStatement(sql);
>prepare.executeQuery(sql);
>}
>catch (Exception ex)
>
>
>Do I need some extra coding for injection attacks, or is this coding
>wrong?
>
>Regards,
>Manuel
>
>
>
>
>
>
>David Graham <[EMAIL PROTECTED]>
>24.10.2003 17:47
>Bitte antworten an "Struts Users Mailing List"
>
>An: Struts Users Mailing List <[EMAIL PROTECTED]>
>Kopie:
>Thema:  [OT] Re: far reaching db question
>
>
>> I create DB-Inserts from my struts application.
>> But If an user types in the sign ' any dynamicly created inserts fail.
>> This ist because of the sql-syntax which divides the string which will
>> be
>> saved with '.
>>
>> For example: insert into table test (name, number) values ('mr burns',
>> '01723256477');
>>
>> How can I handle inserts in html-formulars which have the typed sign ' ?
>>
>
>Always use PreparedStatements.  They handle the ' for you and prevent
>other SQL injection attacks.
>
>David
>
>> Greetings,
>> Manuel
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>__
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search
>http://shopping.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]
>
>


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



RE: HAPPY DIWALI!

2003-10-23 Thread Navjot Singh
Mark,

>Bullshit.  Business looks for cheap labor.  The reason guys like Michael
>Dell, Larry Ellison, and Steve Ballmer lobbied Congress for expansion of
>H-1B numbers was because technical industry workers were able to command
>record-high compensation because of the shortage of LABOR, not TALENT.  The
>flood of H-1B tech workers has diluted the labor market, depressed
>compensation rates, and raised unemployment.

That's one of the skills that business look for. Same work for less money.
Slowly, when all your US companies outsource their work to eastern countries
like india/china, you will have no other option but to go to those countries
OR just fight till death in your country.

BTW, When you get OIL you are all OK, when you PEOPLE it HURTS.

>Do your own homework.  Search on anything from "Washington Post" to google
>on the subject.  This is not just my opinion; it's historical and economic
>fact.

The biggest fact is that Americans are starving fellow Amercians out of
jobs.
Not Indians.

Anyway, this year, just one third of H1B will be issued in India for US as
against the past years for the interest of better employment to native
amercians.
See if this can help your job ;-)

>And it has nothing to do with any ethnic holiday; if you think otherwise,
>you are probably an H-1B.

I have never been on H1B for your info and don't even want to be. However,
if you are interested to work in india, send me your CV.

Navjot Singh


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



RE: HAPPY DIWALI!

2003-10-23 Thread Navjot Singh
Mark,

Don't feel bad about it if you feel little out of place. just enjoy life.

>but anybody from India can get an H1B visa, displacing millions of
>jobs from indigenous Americans, dragging down market labor rates
>and causing 7 percent unemployment in our industry.

Business look for skills. If Americans could provide ample, your businessmen
WONT search in other countries. AND not every indian get a job over there.
Indians who are better than guys like you get there. One day you or your
fellow americans might go to other countries(india will be one of them) for
a job :-)

I won't abuse you on XMas as i respect very religion and their festivals.

Happy Diwali.

>-Original Message-
>From: Mark Galbreath [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 23, 2003 5:42 PM
>To: Struts Users Mailing List
>Subject: RE: HAPPY DIWALI!
>
>
>My point, exactly.  Poor, starving Haitians clinging to rafts can be turned
>back, but anybody from India can get an H1B visa, displacing millions of
>jobs from indigenous Americans, dragging down market labor rates
>and causing
>7 percent unemployment in our industry.  Now we are expected to translate
>Hindu on struts-user?  Happy Diwali my ass
>
>-Original Message-
>From: Vic Cekvenic [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 6:59 PM
>To: [EMAIL PROTECTED]
>Subject: Re: HAPPY DIWALI!
>
>
>http://www.newsforge.com/business/03/10/20/194207.shtml?tid=85
>
>
>Prasenjit Narwade wrote:
>> Shub Deepawali 
>>
>> For those who do not understand Hindi language try to find the meaning of
>> those words.
>>
>>
>> Warm Regards,
>> Prasenjit
>>
>>
>>
>>
>>
>> - Original Message -
>> From: "Andrew Hill" <[EMAIL PROTECTED]>
>> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>> Sent: Wednesday, October 22, 2003 4:05 AM
>> Subject: RE: HAPPY DIWALI!
>>
>>
>>
>>>Happy Deepavali mate! :-)
>>>
>>>-Original Message-
>>>From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
>>>Sent: Wednesday, 22 October 2003 18:50
>>>To: Struts Users Mailing List; Abhijeet Mahalkar
>>>Subject: HAPPY DIWALI!
>>>
>>>
>>> Aapko Naye Saal me...
>>>
>>> Chandragupt Ki Shakti
>>>  Meerabai Ki Bhakti
>>>
>>> Ramchandra Ka Gyan
>>> Karan Ka Daan
>>>
>>>  Einstein Ki Buddhi
>>> Nobel Prize Ki Siddhi
>>>
>>>   Gandhi Ki Ahimsa
>>>  India Ki Parampara
>>>
>>>  Vajpayee Ki Maryada
>>>   Nizaam Ki Sampada
>>>
>>>   Michael Jordan Ki Salary
>>>   Abdul Kalam Ki Vocabulary
>>>
>>>   Bhagat Singh Ka Deshprem
>>>Sweetheart Ka Amarprem
>>>
>>>  Microsoft Ke Share
>>>Rupiyo Ke Dher
>>>
>>>Tata Ke Senses
>>>  Ambani Ke Licenses
>>>
>>>Birla Ka Bangla
>>>   Daler Ka Bhangra
>>>
>>>   Amitabh Ki Style
>>>   Madhuri Ki Smile
>>>
>>>Shahrukh Ki Personality
>>>Aishwarya Ki Popularity
>>>
>>>  Worldtour Ka Ticket
>>>  Tendulkar Ka Wicket
>>>
>>>  Administrator Ke Passwords
>>>   Jokes Ke Forwards
>>>
>>>Mercedez Ki Car
>>>Diamond Ka Haar
>>>
>>> Aur Logon Ka Dher Saraa Pyar Prapt  Ho...
>>>
>>>Wish you a Happy Diwali and a Prosperous New Year
>>>
>>> Regards
>>>Abhijeet Mahalkar
>>>
>>>
>>>
>>>
>>>-
>>>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: hi..

2003-10-22 Thread Navjot Singh
yes, if you can set the value first to some page/request scope variable?

see  in struts docs

Navjot Singh

  -Original Message-
  From: Nisith Dash [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, October 22, 2003 12:01 PM
  To: Struts Users Mailing List
  Subject: hi..


   Hi,

   is there any way in which i can access the value of the 
within the scriptlet

   
   Business Information
   Consumer Credit
<%System.out.println(???);%>
   Car Data Check
   Stategic Solution
   

   Regards,
   Nisith


RE: Display Mode | Edit Mode

2003-10-21 Thread Navjot Singh
NO

>-Original Message-
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 10:49 AM
>To: [EMAIL PROTECTED]
>Subject: Display Mode | Edit Mode
>
>
>Does STRUTS provide any feature so that the same jsp can be used for
>showing the page in Display Mode as well as Edit Mode without having to
>manually code the same in JSP ?
>
>Regards
>Sreekant G
>@ 98404-65630
>
>
>

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



RE: Help needed on Iterate Tag

2003-10-21 Thread Navjot Singh
can you post the error?

>-Original Message-
>From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 10:04 AM
>To: 'Struts Users Mailing List'
>Subject: RE: Help needed on Iterate Tag
>
>
>No It is not working..
>
>-Original Message-
>From: Navjot Singh [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 9:54 AM
>To: Struts Users Mailing List
>Subject: RE: Help needed on Iterate Tag
>
>
>quick try - try replacing Names with names in iterate tag
>
>
>>-Original Message-
>>From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 22, 2003 9:55 AM
>>To: Struts (E-mail)
>>Subject: Help needed on Iterate Tag
>>
>>
>>Hi ,
>>  I have Collection of  Strings and I want to print all the values in
>>this collection using Iterate Tag.
>>  Any guidelines how do I do this ??
>>
>>  I had tried to implement it as follows but it is not working.
>>
>>  
>>
>>  
>>
>>  Here the getNames() method of my form bean returns a Collection of
>>Strings.
>>  The bean:write method tries to search for FormBean with "element"
>>and I get error.
>>  I would really appreciate If someone can help me on this.
>>
>>Thanks,
>>Vikram
>>
>>
>>
>>
>>
>>This message contains information that may be privileged or
>>confidential and
>>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>>for the person to whom it is addressed. If you are not the intended
>>recipient, you are not authorised to read, print, retain, copy,
>>disseminate,
>>distribute, or use this message or any part thereof. If you receive this
>>message in error, please notify the sender immediately and delete
>>all copies
>>of this message.
>>
>>-
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>This message contains information that may be privileged or
>confidential and
>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>for the person to whom it is addressed. If you are not the intended
>recipient, you are not authorised to read, print, retain, copy,
>disseminate,
>distribute, or use this message or any part thereof. If you receive this
>message in error, please notify the sender immediately and delete
>all copies
>of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: Forward/redirect and virtual hosts

2003-10-21 Thread Navjot Singh
you said it's apache problem but you never mentioned apache's role in
problem. So, i will assume you are using mod_jk to have apache tomcat combo.

First thing to check is httpd.conf . Is your webapp and mod_jk handler are
listed under your *external* host name.
Second thing to check is server.xml. Is your webapp context is configured
under your *external* hostname?

I can think that one of this is broken and hence the problem is coming. Or
if we can get config files, i may help better.

HTH
Navjot Singh


>-Original Message-
>From: Dave Tilley [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 9:42 AM
>To: [EMAIL PROTECTED]
>Subject: Forward/redirect and virtual hosts
>
>
>
>Howdy,
>
>   I'm not sure if this is really a Struts config question or
>an Apache
>config question, so i'm gonna ask in both places and hope that someone
>knows enough about both to help point me in the right direction!
>
>
>I've got a Struts webapp under Tomcat that runs fine until it was moved
>to a linux machine with multiple virtual hosts associated with it. The
>machine has two names, like www.external.mycompany.com and
>dev7.internal.mycompany.co.uk  It runs fine on this new linux machine
>*until* execution hits an action like:
>
>
>   .
>   .
>   .
>   
>
>
>
>
>This action is executed correctly when a user is directed to a URL like
>www.external.mycompany.com/myapp/createStuff.do , but then the
>forward/redirect=true ends up sending the browser to the "internal" name
>of the linux machine instead of the "external" name and thus the webapp
>breaks (since there is no session associated with the "internal" machine
>name, only the "external" name)...ie the browser is sent to
>dev7.internal.mycompany.co.uk/myapp/displayOtherStuff.do
>
>
>So, what i'm wondering is:
>
>- Is there a 'safer' way to forward/redirect in a given action other
>than using the  ???
>
>or
>
>- Is there a bug/limitation in using   on
>a machine with multiple virtual hosts?
>
>or
>
>- Do you think my Apache or Tomcat config is just not set up right for
>dealing with several virtual hosts?  Does Tomcat have to be told in
>detail about these virtual hosts, or just Apache?
>
>
>many thanks,
>
>
>   -dave
>
>
>
>
>-
>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: Help needed on Iterate Tag

2003-10-21 Thread Navjot Singh
quick try - try replacing Names with names in iterate tag


>-Original Message-
>From: Thakur, Vikram [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 22, 2003 9:55 AM
>To: Struts (E-mail)
>Subject: Help needed on Iterate Tag
>
>
>Hi ,
>   I have Collection of  Strings and I want to print all the values in
>this collection using Iterate Tag.
>   Any guidelines how do I do this ??
>   
>   I had tried to implement it as follows but it is not working.
>
>   
> 
>   
>
>   Here the getNames() method of my form bean returns a Collection of
>Strings.
>   The bean:write method tries to search for FormBean with "element"
>and I get error.
>   I would really appreciate If someone can help me on this.
>
>Thanks,
>Vikram
>   
>   
>   
>
>
>This message contains information that may be privileged or 
>confidential and
>is the property of the Cap Gemini Ernst & Young Group. It is intended only
>for the person to whom it is addressed. If you are not the intended
>recipient, you are not authorised to read, print, retain, copy, 
>disseminate,
>distribute, or use this message or any part thereof. If you receive this
>message in error, please notify the sender immediately and delete 
>all copies
>of this message.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



RE: communication between control layer & factory/model

2003-10-12 Thread Navjot Singh
can't you pass a HashMap back?

>-Original Message-
>From: Adam Hardy [mailto:[EMAIL PROTECTED]
>Sent: Saturday, October 11, 2003 6:42 PM
>To: Struts Users Mailing List
>Subject: communication between control layer & factory/model
>
>
>I've been happy until now passing objects backwards and forwards between 
>my actions and my factories, and occasionally a int with the number of 
>updates or deletes done, for example, to include in the status messages 
>I show to the user, and throwing exceptions for anything else.
>
>However I've just programmed a page with nested beans and the factory 
>does the whole process in one transaction, covering three different 
>operations which I would like to give three different status messages for.
>
>In brief it is the realm user admin page and the list of nested beans 
>are users - on which the admin op can update the email address, reset 
>the password or delete the user entirely.
>
>I want to tell the admin how many of each operation were done. I could 
>either pass back an ActionMessages, but I don't want to mix struts into 
>my factory layer, or I could pass back a string with different parts:
>
># of email updates
># of password resets
># of deletions
>
>Which is not exactly elegant, since I have to tokenize it.
>
>Anybody got any better solutions?
>
>Adam
>
>-- 
>struts 1.1 + tomcat 5.0.12 + 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]



RE: ejb's and tomcat

2003-10-09 Thread Navjot Singh
then which one is good in your eyes?

>-Original Message-
>From: Mark Galbreath [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 09, 2003 4:38 PM
>To: Struts Users Mailing List
>Subject: RE: ejb's and tomcat
>
>
>JBoss is crap, anyway.
>
>-Original Message-
>From: Brian McSweeney [mailto:[EMAIL PROTECTED]
>Sent: Thursday, October 09, 2003 7:44 AM
>
>This isn't the case for jboss at least. You gain major performance
>increases.
>
>-Original Message-
>From: Mark Galbreath [mailto:[EMAIL PROTECTED] 
>Sent: 09 October 2003 10:35
>
>Yes, the advantage of using local interfaces in EJBs is avoiding the
>creation of stubs and skeletons, use of RMI and serialization.  But what
>many people don't realize is that all the major containers have been
>doing
>this since 1.1 anyway, abeit in proprietary ways.  You really gain no
>performance advantage by explicitly declaring an EJB interface local -
>you
>merely adhere to the specification.
>
>Mark
>
>-Original Message-
>From: Kunal H. Parikh [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 08, 2003 8:20 PM
>
>The CMP2.x spec allows declaring EJBs as local objects.
>
>The advantage of the local EJB objects is that they don't get
>serialized/deserialized(I think) and pass-by-reference and not by-value.
>
>Effectively, If you use a LocalEJB, you have the flexibitly of making
>the REMOTE with very few changes to code.
>
>
>-
>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: urlrewriting Vs Cookies

2003-10-08 Thread Navjot Singh
here is the clue.

cookies are again of two types.

+ persistent - will remain there even if you close browser and opens next
day.
+ non-persistent/session - the moment you close browser window they are
gone. These also work only under child browser windows.

So, i assume you are looking for session cookies.

If you love URL rewriting, you can disable the user session after 10 minutes
of inactivity. Depends on how much pain would you like to take for it and
how secure you wish your application to be.

HTH
Navjot Singh

>
>Hi navjot,
>Thanks for the reply...But the problem with url rewriting is that
>jsessionid is maintained across browsers so that users can access
>the application if they get the url..[even on other system the
>application work if u get the url]..so is there any other option???
>Thanks
>Prashanth
>
>
>Navjot Singh <[EMAIL PROTECTED]> wrote:
>theoretcially, there are 3 ways.
>
>1. URL Rewriting
>2. Client side Cookies
>3. Server side Session (again use cookies but just for an ID)
>
>if you are adamant about not using cookies at any level. URL rewriting is
>the only option left.
>
>any other?
>navjot singh
>
>>-Original Message-
>>From: Prashanth.S [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, October 08, 2003 1:30 PM
>>To: [EMAIL PROTECTED]
>>Subject: urlrewriting Vs Cookies
>>
>>
>>Hi all,
>>i want to know that among urlrewriting and cookies,which one is
>>better???If i dont want to use cookies is there any otherway to do
>>session invalidation[other than url rewriting]..Iam using resin.
>>Thanks
>>Prashanth
>>
>>
>>
>>
>>-
>>Do you Yahoo!?
>>The New Yahoo! Shopping - with improved product search
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>-
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search


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



RE: urlrewriting Vs Cookies

2003-10-08 Thread Navjot Singh
theoretcially, there are 3 ways.

1. URL Rewriting
2. Client side Cookies
3. Server side Session (again use cookies but just for an ID)

if you are adamant about not using cookies at any level. URL rewriting is
the only option left.

any other?
navjot singh

>-Original Message-
>From: Prashanth.S [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, October 08, 2003 1:30 PM
>To: [EMAIL PROTECTED]
>Subject: urlrewriting Vs Cookies
>
>
>Hi all,
>i want to know that among urlrewriting and cookies,which one is
>better???If i dont want to use cookies is there any otherway to do
>session invalidation[other than url rewriting]..Iam using resin.
>Thanks
>Prashanth
>
>
>
>
>-
>Do you Yahoo!?
>The New Yahoo! Shopping - with improved product search


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



RE: Container-Managed Authentication in web.xml vs . Specifying Paths in the struts-config.xml

2003-10-07 Thread Navjot Singh
you may wish to look upon JAAS if you have so many diff roles and user per
roles.

Anyway, struts lets you specify role atrribute (that takes comma sep values,
i guess)
for each action. If you can extend RequestProcess class and modify the
processRoles() method so you can redirect to any page if the roles are not
valid for that action. etc etc..

Struts,using decalrative roles, tried to make things easier in term sof less
programming efforts and easiness to manage roles . Rest i can't see much
diff. Any opinions?

HTH
Navjot Singh

>-Original Message-
>From: Caroline Jen [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 07, 2003 7:26 AM
>To: Struts Users Mailing List
>Subject: RE: Container-Managed Authentication  in web.xml
>vs . Specifying Paths in the struts-config.xml
>
>
>But, I do not want to use BASIC authentication.  I
>have many different roles and hundreds of people per
>role.  Users' name, role, etc. are stored in a
>database.
>--- Matt Raible <[EMAIL PROTECTED]> wrote:
>> A JDBCRealm can use BASIC authentication - it
>> doesn't require form-based.
>> Here's an example app that might help you out:
>>
>>
>http://raibledesigns.com/wiki/Wiki.jsp?page=SecurityExample
>>
>> HTH,
>>
>> Matt
>>
>> -Original Message-
>> From: Caroline Jen [mailto:[EMAIL PROTECTED]
>> Sent: Monday, October 06, 2003 4:45 PM
>> To: [EMAIL PROTECTED]
>> Subject: Container-Managed Authentication
>>  in web.xml vs.
>> Specifying Paths in the struts-config.xml
>>
>>
>> I use the Tomcat.  I configured the Tomcat JDBCRealm
>> so that I can use programmic security testing, such
>> as
>> isUserInRole(), in my program.
>>
>> Because Tomcat JDBCRealm is form based, I inserted
>> the
>>  and its sub-elements in my web.xml
>> file
>> (see below).  As we know, the  and
>>  are required.
>>
>> My question is that the container-managed
>> authentication does not seem to be consistent with
>> what we usually do in struts; e.g. we state the
>> logical name and path for each .jsp page in the
>> struts-config.xml file.
>>
>> What is the Struts convention in dealing with user
>> authentication?  Should we specify the paths for the
>> logon page and error page in the struts.config.xml
>> or
>> we should use the  and
>>  in the web.xml file?
>>
>>
>==
>> 
>>
>>
>> SalesInfo
>>   /SalesInfo/*
>>   GET
>>   POST
>>
>>
>>   manager
>>
>>
>>
>> NONE
>>
>> 
>>
>> 
>>FORM
>>
>>
>>
>/authentication/login.html
>>
>>
>/authentication/error.html
>> 
>>
>> 
>>
>> 
>>manager
>> 
>>
>>
>>
>>
>> __
>> Do you Yahoo!?
>> The New Yahoo! Shopping - with improved product
>> search
>> http://shopping.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!?
>The New Yahoo! Shopping - with improved product search
>http://shopping.yahoo.com
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: Performance constraints

2003-10-07 Thread Navjot Singh
>--> the performance constraints that come due to the use of struts
>framework.
>--> the constraints that come due to the use of actionservlet.

I have hardly noticed nay perf loss on using struts. Naturally, every
framework has some overheads but you got to trade off with the maintence and
scalablity perspective and patternized arch.

>--> How does the action servlet take care of multiple requests for
>the same web application ?

There will be only 1 ActionServlet instance. Any request that's coming to
webserver will be forwarded to ActionServlet. ActionServlet tries to assign
one Action instance from the pool. If it's not there, the new Action
instance will be created and assigned to the request.

HTH
Navjot Singh


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



RE: Urgent: No Getter Method found

2003-09-25 Thread Navjot Singh
change the variable txtusergroupcode to txtUserGroupCode. it will work.

|-Original Message-
|From: Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
|Sent: Friday, September 26, 2003 12:13 PM
|To: Struts Users Mailing List
|Subject: Urgent: No Getter Method found 
|
|
|hi All
|I am getting following error while invoking JSP file ..
|
|
|txtUserGroupCode of bean org.apache.struts.taglib.html.BEAN]: 
|javax.servlet.jsp.JspException: No getter method for property 
|txtUserGroupCode of bean org.apache.struts.taglib.html.BEAN
|
|i have following code in the Action Clas...  still i am getting 
|the error please Sugest solution for this...
|
|
|
| public String getTxtUserGroupCode()
| {
|  return this.txtusergroupcode ;
| }
|
| public void setTxtUserGroupCode(String s)
| {
|  this.txtusergroupcode = s ;
| }
|
|

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



RE: ApplicationResources.properties

2003-09-24 Thread Navjot Singh
it just should be in classpath.

|-Original Message-
|From: Martin Gainty [mailto:[EMAIL PROTECTED]
|Sent: Thursday, September 25, 2003 12:52 AM
|To: [EMAIL PROTECTED]
|Subject: ApplicationResources.properties
|
|
|What mechanism does struts use to find the 
|ApplicationResources.properties file?
|All attempts by Tomcat to locate the file result in failure
|
|The configuration in web.xml as:
|
|
|
|http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
|
|
|
|
|
|
|
|action
|
|org.apache.struts.action.ActionServlet
|
|
|
|application
|
|ApplicationResources
|
|
|
|Thanks,
|-Martin
|

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



RE: request.getContextPath();

2003-09-05 Thread Navjot Singh
but this your contextPath. so, request returns that string that you set.

Is PostGraduate.war your file name?
or in server.xml you have set contextPath="/PostGraduate".

navjot
|-Original Message-
|From: Mohd Amin Mohd Din [mailto:[EMAIL PROTECTED]
|Sent: Friday, September 05, 2003 1:44 PM
|To: [EMAIL PROTECTED]
|Subject: request.getContextPath();
|
|
|Hi,
| 
|Having a wired problem here. On some of my pages, the
|request.getContextPath() works great, but on other pages, it doesn't
|seem to work, it only gets the webapp. Eg.
|page is in
|http://192.168.1.111:8080/PostGraduate/admission/application/listProfile
|Setup
|  i'm only receiving a "PostGraduate/" when I do a
|request.getContextPath();
| 
| 
|Thanks in advance
|Amin
| 
|

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



RE: Probelm with routing.

2003-09-05 Thread Navjot Singh
not sure if struts handles exceptions thrown from RequestProcessor.


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Friday, September 05, 2003 2:20 PM
|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(Ap
|plicationFilterChain.java:247)
|
| at
|org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicatio
|nFilterChain.java:193)
|
| at
|org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrappe
|rValve.java:243)
|
| at
|org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeli
|ne.java:566)
|
| 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(StandardContex
|tValve.java:190
|
|Regards
|Sreekant G
|
|
|


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



RE: Exception framework Usage

2003-09-01 Thread Navjot Singh
Well, that's a very nice question.

I have created 1 jar file that's called commons-exceptions.jar (I like
apache commons a lot :-)
Then it depends upon your packaging how do you wish to go about it. I
generally keep this in my app.war.

>Please provide your input on the directory structure.(at web
>layer and also at application layer) or exception classes
>should be at root level?

Keep any directory structure that you wish. As an example, these base
exceptions can be in com/navjot/exceptions.

then you can have
+ web specific exceptions in /com/navjot/web/member/exceptions/
+ ejb specific exceptions in /com/navjot/ejb/member/exceptions/
>Also let me know whether your base exception classes (AppException
>and AppRuntimeException) extend from Exception or
>EJBException or something else?

My AppException extends from Exception and AppRuntimeException extends from
RuntimeException.

>For each different type of exception situation, should
>we have different exception classes or just a set of classes
>solve the purpose?

Ideally, exceptions are bound to some flaw in business logic. So should be
kept together.

However, if you wish, you may replace
DuplicateEmailException & DuplicateUserException
with

DuplicateKeyException
- what   /*what is duplicate, email oruser*/
+ getWhat():String
+ setWhat(Stirng)

It's just another way that is desired sometimes. Personally, I never
followed this staregy ;-)

>Thanks Navjot for reply.

HTH
Navjot Singh





-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Monday, September 01, 2003 6:23 PM
To: Struts Users Mailing List
Subject: RE: Exception framework Usage

hi viral,

You are thinking in the right direction. That's the way i do it.

I have got 2 base exception classes. AppException and AppRuntimeException.

1. The exceptions that come under the purview of the business logic and
these can be handled somehow at the controller/model layer to alter the flow
of control MUST extend AppException.

2. The exceptions that does not come under the purview of the business logic
and raise because of the system or network problems MUST extend
AppRuntimeException.

However, one must use some common sense to decide which exception should go
where.
Say, we are connecting to some URL and it may throw TimeoutException. which
is not a checked exception. We must be ready to capture this and throw some
checked exception.
The caller may catch the exception and try connecting againmay be thrice
;-) and if still no luck the caller passes on the message to PRESENTATION.

So your code will not be cluttered with "throws XRuntimeException" and
tthese exceptions MUST be handled back at CONTROLLER layer only. MODEL layer
should just handle CHECKED exceptions.

Examples
At Controller  => DuplicateEmailException extends AppException (we may
display the same form showing error on top)
At Model => InsufficientBalanceException extends AppException (we may charge
as much as he has got and rest of the amount we will accomodtae in next
invoice)

DatabaseAccessException extends AppRuntimeException ( as there is hardly
anything we can do about this. We MAY show some nice "SORRY" page and/or may
LOG this exception somewhere)

BTW, there is some nice article on "Exception handling" on IBM Developer
site. Do check.

hope this helps and suggestions are welcome.
Navjot Singh


  -Original Message-
  From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
  Sent: Monday, September 01, 2003 5:50 PM
  To: Struts Users Mailing List
  Subject: Exception framework Usage


  Hi,



  Please suggest the exception framework in a scenario in a following
scenario.



  Struts Action class  a Business Delegate --> EJB a OR Mapping (Top link) a
Domain classes



  Please validate the below lines.



  There will be three layers at which we need to handle the exception.



  At EJB layer, at business delegate and at struts layer.



1.. EJB layer (session bean) methods will throw the (Application)
business exceptions along with RemoteException. In the catch block it will
throw the EJBException (in case of checked system exceptions like
NamingException).
2.. At business delegate layer, we will throw the application exceptions
in the catch block rather than EJBException to decouple the web layer and
EJB layer.
3.. At struts layer, in the Action class's execute(), we will catch all
these business exceptions.


  Please provide your valuable inputs.



  Thanks in advance.


























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



RE: Exception framework Usage

2003-09-01 Thread Navjot Singh
hi viral,

You are thinking in the right direction. That's the way i do it.

I have got 2 base exception classes. AppException and AppRuntimeException.

1. The exceptions that come under the purview of the business logic and
these can be handled somehow at the controller/model layer to alter the flow
of control MUST extend AppException.

2. The exceptions that does not come under the purview of the business logic
and raise because of the system or network problems MUST extend
AppRuntimeException.

However, one must use some common sense to decide which exception should go
where.
Say, we are connecting to some URL and it may throw TimeoutException. which
is not a checked exception. We must be ready to capture this and throw some
checked exception.
The caller may catch the exception and try connecting againmay be thrice
;-) and if still no luck the caller passes on the message to PRESENTATION.

So your code will not be cluttered with "throws XRuntimeException" and
tthese exceptions MUST be handled back at CONTROLLER layer only. MODEL layer
should just handle CHECKED exceptions.

Examples
At Controller  => DuplicateEmailException extends AppException (we may
display the same form showing error on top)
At Model => InsufficientBalanceException extends AppException (we may charge
as much as he has got and rest of the amount we will accomodtae in next
invoice)

DatabaseAccessException extends AppRuntimeException ( as there is hardly
anything we can do about this. We MAY show some nice "SORRY" page and/or may
LOG this exception somewhere)

BTW, there is some nice article on "Exception handling" on IBM Developer
site. Do check.

hope this helps and suggestions are welcome.
Navjot Singh


  -Original Message-
  From: Viral_Thakkar [mailto:[EMAIL PROTECTED]
  Sent: Monday, September 01, 2003 5:50 PM
  To: Struts Users Mailing List
  Subject: Exception framework Usage


  Hi,



  Please suggest the exception framework in a scenario in a following
scenario.



  Struts Action class  a Business Delegate --> EJB a OR Mapping (Top link) a
Domain classes



  Please validate the below lines.



  There will be three layers at which we need to handle the exception.



  At EJB layer, at business delegate and at struts layer.



1.. EJB layer (session bean) methods will throw the (Application)
business exceptions along with RemoteException. In the catch block it will
throw the EJBException (in case of checked system exceptions like
NamingException).
2.. At business delegate layer, we will throw the application exceptions
in the catch block rather than EJBException to decouple the web layer and
EJB layer.
3.. At struts layer, in the Action class's execute(), we will catch all
these business exceptions.


  Please provide your valuable inputs.



  Thanks in advance.


























RE: [OT] Scheduling

2003-09-01 Thread Navjot Singh
whynot?

use crontab -e to add a program and the times when it should run
use crontab -l to view what all programs are scheduled to run.

navjot


|-Original Message-
|From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
|Sent: Monday, September 01, 2003 3:37 PM
|To: [EMAIL PROTECTED]
|Cc: [EMAIL PROTECTED]
|Subject: RE: [OT] Scheduling
|
|
|
|Hi,
|Can you throw some light on the Unix "cron". I have Weblogic running on
|Unix. so, i guess i can use this solution.
|
|thanks
|-raj
|
|
|
|
|
|
|
|  "Hue Holleran"
|
|  <[EMAIL PROTECTED]To:
|"Struts Users Mailing List" <[EMAIL PROTECTED]>
|
|  Action.net>   cc:
|
|Subject:  RE:
|[OT] Scheduling
|  01/09/2003 03:26 PM
|
|  Please respond to
|
|  "Struts Users Mailing
|
|  List"
|
|
|
|
|
|
|
|
|
|Well, possibly not an elegant answer but...
|
|1) Under *nix we've done this with "cron" and a "bash script" that invokes
|"wget" to launch a servlet process.
|2) Under Windows we've used a VBS script via "at"/"winat"/"Scheduled Tasks"
|and "Microsoft.XMLHTTPRequest" to initiate a HTTP connection to launch a
|servlet process.
|
|Both have been very reliable (in fact both are in very widespread use on
|several servers) - and this is nice as it does not require any 3rd party
|components.
|
|If this is along the lines of what you're trying to do let me know and I
|can
|post some code. As regards Weblogic, there's possibly a more elegant
|solution, but sorry don't use it - so don't know.
|
|Hue.
|
|> -Original Message-
|> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
|> Sent: 01 September 2003 06:37
|> 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]
|>
|>
|> ---
|> 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]
|
|


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



RE: Handling Exceptions

2003-09-01 Thread Navjot Singh
For ServletException, configure the error page in web.xml file. 
it will work.

navjot


|-Original Message-
|From: Mohd Amin Mohd Din [mailto:[EMAIL PROTECTED]
|Sent: Sunday, August 31, 2003 5:12 PM
|To: [EMAIL PROTECTED]
|Subject: Handling Exceptions
|
|
|Hi,
| 
|In struts-config, I have defined few global-exceptions such as these
| 
|  
|  
|  
|   
|  
|   
| 
|I also have created an error page, error.jsp with <%@ page
|isErrorPage="true" %> and at the top of the jsp template for all the
|pages a <%@ page errorPage="error.jsp" %>. However, when a
|ServletException occurs, it does not go to the path defined in
|struts-config.xml. Somehow, the error is still showing in the
|application page and not in any one of the error pages defined.
| 
|Thanks
|Amin 
| 
| 
|

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



RE: SubClass RequestProcessor or Action class

2003-09-01 Thread Navjot Singh

you can specify some property for you action in config.xml.
In yur MyOwnRequestprocessor, just check whether that prooperty exists or
not, call the method if yes.



Please see the archives. This is one of the Qs that has been asked time to
time and lots of guys have done this well. One of the guys has posted some
XML that he would use in config.xml.


regards
Navjot Singh


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Monday, September 01, 2003 12:17 PM
|To: Struts Users Mailing List
|Subject: RE: SubClass RequestProcessor or Action class
|
|
|
|Actually I would like to extend the RequestProcessor class (let's say
|MyOwnRequestProcessor inheriting from RequestProcessor) and override the
|preProcess() method to embed some security related code. I was wondering
|how would I let STRUTS framework know that MyOwnRequestProcessor should be
|called instead of the standard STRUTS RequestProcessor. My ultimate aim is
|to guarantee that the piece of code I embed in the preProcess() method
|should definitely be executed for every request. Please bear with me if I
|am making no sense as I am still in the process of getting good idea on
|STRUTS.
|
|Regards
|Sreekant G
|
|
|
|
|  "Andrew Hill"
|
|  <[EMAIL PROTECTED]To:
|"Struts Users Mailing List" <[EMAIL PROTECTED]>
|
|  idnode.com>  cc:
|
|   Subject:  RE:
|SubClass RequestProcessor or Action class
|  09/01/2003 11:30 AM
|
|  Please respond to
|
|  "Struts Users Mailing
|
|  List"
|
|
|
|
|
|
|
|
|
|This is a joke right?
|
|...Friday is well and truly over mate. Its Monday now.
|
|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Monday, 1 September 2003 12:03
|To: [EMAIL PROTECTED]
|Subject: SubClass RequestProcessor or Action class
|
|
|HI All,
|
|As a general practice all the application action classes are inherited from
|org.apache.struts.action.Action class. What are the Pro's and Con's of
|inheriting the application action classes from
|org.apache.struts.action.RequestProcessor class instead ?
|
|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 PROTECTED]



RE: What is Java Server faces ?

2003-08-29 Thread Navjot Singh
Hi,

I guess most of the people have some misconception about JSF. They are not
here to compete with Struts and i think of them as complementary support to
Struts framework.

Start reading on JSF here http://www.jsfcentral.com

regards
Navjot Singh


|-Original Message-
|From: Madhu Nair [mailto:[EMAIL PROTECTED]
|Sent: Friday, August 29, 2003 1:22 PM
|To: Struts Users Mailing List
|Subject: What is Java Server faces ?
|
|
|
|Hi,
|
|What is java server faces technology? Is it similar to Struts ? Will all
|that I learnt about Struts go waste?
|
|Regards,
|Madhu
|
|
|-
|Madhu Nair
|Member of Technical Staff,
|Persistent Systems Private Limited,
|Pune 411016 INDIA.
|Tel: +91-20-5678900 Ext: 335
|
|
|-
|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 access a session object from a form class

2003-08-27 Thread Navjot Singh
I guess you can't and why would you need it?
Your Action SHOULD play with Session objects and Form objects.


|-Original Message-
|From: Bård Arve Evjen [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 27, 2003 12:25 PM
|To: [EMAIL PROTECTED]
|Subject: How to access a session object from a form class
|
|
|I need to be able to get a session variable from a form class. How
|can access it?
|
|Cheers,
|Bard
|
|-
|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: J2EE IDE

2003-08-27 Thread Navjot Singh
Well, i like Eclipse a lot but it has it's constraints.
If you wish to have O/R mapping support in your IDE, try JDeveloper etc.
Although i have never used JBulder or IntelliJ but they are also good ones.

navjot

|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 27, 2003 12:16 PM
|To: [EMAIL PROTECTED]
|Subject: J2EE IDE
|
|
|Can someone please suggest me a free J2EE IDE suitable for development of
|webapps using STRUTS. I know of some IDE's like the FORTE, ECLIPSE,
|NETBEANS. However I wanted to ckeckout if anyone has already evaluated any
|of these since I am not sure which one is easy to use and has reasonably
|good features as well.
|
|Regards
|Sreekant G
|
|
|

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



RE: Design question

2003-08-26 Thread Navjot Singh
|
|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]



RE: Paging through DB ResultSets

2003-08-26 Thread Navjot Singh

Model Layer
If you database supports *limit* clause, use that.
OR
Use Paging Patterns (known as Value List Handler in J2EE but i think it's
misnomer ;-)

Presentation Layer
Use Pager Taglib


|-Original Message-
|From: Kapadia Mitesh-C23457 [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, August 26, 2003 1:53 AM
|To: [EMAIL PROTECTED]
|Subject: Paging through DB ResultSets
|
|
|Any suggestions or ideas on how I can page through a DB ResultSet?
|
|Thanks in advance.
|
|- Mitesh
|


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



RE: struts with other frameworks and JSTL

2003-08-26 Thread Navjot Singh
|Hi all,
|I have 2 questions
|1-->Where can i find comparision between struts and other
|frameworks[like cacoon etc etc]

See struts archives, around 2 months back someone gave a wonderful
comparison of struts with expresso etc

|2-->How can i switch existing application [which uses lot os jstl
|and customised taglibs] into struts framework..just need a brief idea...

you need to change lots of code ;-)


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



RE: Design question...

2003-08-25 Thread Navjot Singh
hi,

If are getting some collection to the JSP page and just wish to display a
subset of them without changing anything on BL layer, Use Pager Taglib and
get away with it easily.

But there is a downside to it as you may have 1000 records and you just want
to show 10. So, 990 records are burden on network for no use at all.

But you can avoid this also. Pager taglib provides you with one parameter
"offset" that can be passed onto the controller layer and then to your
Session EJB. Session EJB will trim the 1000 records collection obtained to
10 records based on that offset value. Now when you pass the DTO back, it
will contain maximum 10 records. Reducing network load and you get only
those records that you want in presentation layer.

HTH
navjot singh

|-Original Message-
|From: Keith Pemberton [mailto:[EMAIL PROTECTED]
|Sent: Sunday, August 24, 2003 7:09 PM
|To: [EMAIL PROTECTED]
|Subject: Design question...
|
|
|I have a JSP page that contains entries from a database.  I am getting
|the items using a DTO that is passed from a session EJB.  What I would
|like to be able to do is to specify a parameter in the URL named
|"offset" that when changed would display the next results from the
|database.  Couple of questions... Would it be considered "presentation"
|logic to perform the action of getting the DTO from the session bean
|within the JSP page?  I really don't want to do it that way because I'm
|trying to keep the layers as separate as possible.  So, if I don't do it
|that way, I will have to use Action classes and html:links that can pass
|the parameter to action class?
|
|My real question is what is the best way of dealing with EJBs in the
|presentation layer?  I know that I have to get a DTO of the information
|that I want, but usually the methods of the DTO take parameters that I
|can't pass to the DTO in the JSP page.  I have read over and over the
|Oreilly Struts book but it still is confusing me.  Thanks for any help!
|
|Keith Pemberton
|--
|Keith Pemberton <[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 Navjot Singh
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]



RE: Problem build war using Ant

2003-08-23 Thread Navjot Singh
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]



RE: Generating logs w/Log4J in ActionClass

2003-08-22 Thread Navjot Singh
i just vaguely remember
private Logger logger = Logger.getLogger(Test.class);
logger.debug("Better Check log4j docs");

and keep the log4j.properties file in classpath.

hth
navjot singh


|-Original Message-
|From: Kapadia Mitesh-C23457 [mailto:[EMAIL PROTECTED]
|Sent: Thursday, August 21, 2003 9:25 PM
|To: [EMAIL PROTECTED]
|Subject: Generating logs w/Log4J in ActionClass
|
|
|I have the appropriate configurations completed to use Log4J w/Tomcat. 
|However, how would I invoke Log4J from within my action class to generate
|DEBUG statements? 
|I have the following package imported: 
|import org.apache.log4j.*; 
|Any examples would be most appreciated. 
|Thanks in advance. 
|- Mitesh 
|

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



RE: Struts Action or EJB session bean

2003-08-22 Thread Navjot Singh
file uploading is user front job and let the Struts handle it. 
Sessionbeans are bad choice!!


|-Original Message-
|From: Erez Efrati [mailto:[EMAIL PROTECTED]
|Sent: Friday, August 22, 2003 5:33 PM
|To: 'Struts Users Mailing List'
|Subject: Struts Action or EJB session bean
|
|
|My EJB/Web application lets users upload files to the system and later
|serve them those files when needed. My question is:
|Who should or recommended to handle the saving of the uploaded file? The
|EJB session bean or the struts UploadAction?
|
|Thanks in advance,
|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]



RE: Logging to application directory

2003-08-22 Thread Navjot Singh
use log4j or jdk1.4 logging.

|-Original Message-
|From: Louise Pryor [mailto:[EMAIL PROTECTED]
|Sent: Friday, August 22, 2003 8:38 PM
|To: Struts Users Mailing List
|Subject: Logging to application directory
|
|
|Is there any easy way of sending logs to somewhere in my application
|directory, rather than eg Tomcat/logs? The latter is OK when I'm
|developing the application on my own machine, but when I deploy onto
|my shared host I don't have access to the Tomcat logs directory. And
|however carefully I test on my own machine, I can't reproduce the
|environment exactly and there's always something that goes wrong.
|
|I have totally failed to get to grips with logging so far, so any help
|will be appreciated.
|
|Thanks
|
|Louise
|
|-- 
|Louise Pryor 
|http://www.louisepryor.com
|
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|

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



RE: login request + ActionServlet RequestProcessor Action

2003-08-21 Thread Navjot Singh
Although I am extending Action class as of now but
extending Requestprocessor should be a better choice. After all
ActionServlet, after all the initializations, delegates control to
RequestProcessor.

Let's keep ActionServlet only for one time inits.

hth
Navjot Singh


|-Original Message-
|From: Andy Richards [mailto:[EMAIL PROTECTED]
|Sent: Thursday, August 21, 2003 2:19 PM
|To: Struts Users Mailing List
|Subject: Re: login request + ActionServlet RequestProcessor Action
|
|
|Hi
|
|After deciding which approach to take and reading a few of my struts books
|about the controller object ; ) I am now confused as which is the most
|appropriate class to extend to perform my login functionality.
|David suggests
|extending the base action class, however i have read that the
|RequestProcessor class was added to struts1.1 to extend the ActionServlet.
|From what i can see this class handles all requests and one of its methods
|calls the appropriate action. Therefore which would be the better class to
|extend  ActionServlet, RequestProcessor or Action. Any ideas.?
|
|thanks
|
|Andy
|
|On Wednesday 20 Aug 2003 2:41 pm, David G. Friedman wrote:
|> Dear Andy,
|>
|> I'm doing the same thing you suggest.  My approach is
|> to extend the base Action (or any type of Action) class
|> by adding a functon 'checkLogin'.  It takes the 'request'
|> as the argument, checks the session for a User bean, and
|> throws an exception if the bean is missing or if the ID
|> number on the bean is zero/unset.  In my execute() method
|> I make my first line 'checkLogin(request)' and it handles
|> my authentication.
|>
|> If you try this approach, keep in mind I'm using Struts
|> v1.1 final so I can use exceptions.
|>
|> Tonight I'm going to try switching it to an interface so
|> I can use it to extend any action type by using 3 lines
|> (and without sub-classing):
|>
|> 1. import com.mycompany.auth.LoginCheck;
|> 2. public class MyAction extends Action implements LoginCheck
|> 3. checkLogin(request) <--- 1st line from within the execute
|> or DispatchAction, or LookupDispatchAction method, etc.
|>
|> Regards,
|> David
|>
|> ---Original Message---
|> From: Andy Richards <[EMAIL PROTECTED]>
|> Sent: 08/20/03 09:46 AM
|> To: [EMAIL PROTECTED]
|> Subject: login request
|>
|> > Hi, i have created a form and a action which checks to see if a user
|>
|> exists
|> in
|> my database and if so a value object is placed into the session.
|What i am
|>
|>
|> unsure of is how to a action called everytime a request is made? Can i
|> configure struts-config.xml to send all requests via an action to see if
|> this
|> session object exists, and if not redirect the user to the login page?
|>
|> many thanks
|>
|> Andy
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|


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



RE: Security and Roles related

2003-08-20 Thread Navjot Singh
hi sree,

I suppose all you wish to do is to control flow/display based on different
roles.

If yes and you have struts 1.1, pls read on.

Struts allows you to set roles for different actions using
strust-config.xml. So, user belonging to particular role say "ADMIN" can
call that ACTION.

Moreover, in your JSPs, you can always check isUserInRole() etc. it's just
call on your request object.
Struts even provide the tag for that  et al..

do write should you need more help.
Navjot Singh


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 20, 2003 12:26 PM
|To: [EMAIL PROTECTED]
|Subject: RE: Security and Roles related
|
|
|
|Hi Navjot,
|
|Thanks for your response. Will you be able to elaborate a little more on
|your statement "STRUTS supports JAAS". I understand that JAAS is the J2EE
|based authentication and authorization component. So from a STRUTS
|perspective what is involved in tying up with JAAS to use the JAAS specific
|API's ? And will I have any facility in the JSP to check for the roleType
|before including a particular section of the page.
|
|Regards
|Sreekant G
|
|
|
|
|
|  "Navjot Singh"
|
|  <[EMAIL PROTECTED]To:   "Struts
|Users Mailing List"
|  ia.net>
|<[EMAIL PROTECTED]>
|   cc:
|
|  08/19/2003 05:30 Subject:  RE:
|Security and Roles related
|  PM
|
|  Please respond to
|
|  "Struts Users
|
|  Mailing List"
|
|
|
|
|
|
|
|
|
|struts provide support for JAAS and JAAS further supports the security
|roles
|and accesses independent of mechanisms.
|will that do?
|
|hth
|-navjot
|
||-Original Message-
||From: [EMAIL PROTECTED]
||[mailto:[EMAIL PROTECTED]
||Sent: Tuesday, August 19, 2003 4:38 PM
||To: [EMAIL PROTECTED]
||Subject: Security and Roles related
||
||
||Does STRUTS provide integration with any security framework independent of
||the underlying application server. Basically I am looking at services like
||isUserInRole(), getRole() and the sort.
||
||Regards
||Sreekant G
||@ 98404-65630
||
||
||
|
|
|-
|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 set Struts package as default

2003-08-20 Thread Navjot Singh
war file deployment won't work here.

configure 
one host entry in server.xml file with appBase="/dir/path/to/app". 
one context entru with docBase="", path="/" and unpackWars="false"

it should work.

hth
navjot singh


|-Original Message-
|From: Jian Dai [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 20, 2003 11:42 AM
|To: Struts Users Mailing List
|Subject: How to set Struts package as default
|
|
|Hi, all:
|
|I am developing a Struts application on Tomcat. Currently, 
|the link for my application has to be like:
|http://myhost/myStrutsApp/index.jsp
|
|I would like to set this application as default, like
|http://myhost/index.jsp
|
|Is there anybody can suggest how I may do it?
|
|Many thanks in advance for the nice help. 
|
|Jack
|
|
|
|
|-
|To unsubscribe, e-mail: [EMAIL PROTECTED]
|For additional commands, e-mail: [EMAIL PROTECTED]
|
|

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



RE: Security and Roles related

2003-08-19 Thread Navjot Singh
struts provide support for JAAS and JAAS further supports the security roles
and accesses independent of mechanisms.
will that do?

hth
-navjot

|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]
|Sent: Tuesday, August 19, 2003 4:38 PM
|To: [EMAIL PROTECTED]
|Subject: Security and Roles related
|
|
|Does STRUTS provide integration with any security framework independent of
|the underlying application server. Basically I am looking at services like
|isUserInRole(), getRole() and the sort.
|
|Regards
|Sreekant G
|@ 98404-65630
|
|
|


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



RE: Session expired

2003-08-19 Thread Navjot Singh
yes.

If you are using servlet 2.3 container, write a filter that can check the
session status, if expired will redirect the control to the standard
expired.jsp page otherwise the control is passed to thr requested jsp.

hth
navjot singh

|-Original Message-
|From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, August 19, 2003 4:28 PM
|To: Struts Users Mailing List
|Subject: Re: Session expired
|
|
|What if you check from your action before redirecting to a  jsp ?
|
|
|Filip Polsakiewicz wrote:
|
|>Hi,
|>is there any way to redirect y user to a jsp if the session is expired
|>without checking for an expired session within each single jsp?
|>
|>Thanks, Filip
|>
|>
|>
|>
|>-
|>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: get data source in servlet

2003-08-19 Thread Navjot Singh
if your servlet is extending ActionServlet, you can retreive the DataSource
from
ServletContext.getAttribute(Globals.DATA_SOURCE_KEY). You may have to append
"module key" to DATA_SOURCE_KE if you are using  modules.

If your servlet is NOT extending ActionServlet, better move( or copy?) your
Data Source from struts-config.xml to web.xml

hth
navjot singh

|-Original Message-
|From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
|Sent: Monday, August 18, 2003 8:38 PM
|To: [EMAIL PROTECTED]
|Subject: get data source in servlet
|
|
|Hi,
|I have defined a data source in my struts-config file,
|which is working fine as i get the connection in my
|Action class, but i need to get the data source in a
|Servlet, can any one provide with the code to get the
|data source in servlet
|
|Ashish
|
|__
|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]



RE: Tiles. using action for attribute value.

2003-08-18 Thread Navjot Singh
Tiles. using action for attribute value.try making straight call to
header.jsp, it should work.
OR
if you must need Struts Controller in call to header.jsp, use "include"
(instead of forward) in your header.do action mapping.

hth
navjot singh
  -Original Message-
  From: deepaksawdekar [mailto:[EMAIL PROTECTED]
  Sent: Monday, August 18, 2003 6:37 PM
  To: [EMAIL PROTECTED]
  Subject: 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


RE: How to identify the Requested Path Info

2003-08-14 Thread Navjot Singh
servlet container provides that info 

|-Original Message-
|From: Kommineni, Sateesh (IndSys)
|[mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 13, 2003 5:20 PM
|To: Struts Users Mailing List
|Subject: How to identify the Requested Path Info
|
|
|Hi All,
|
|   How can the framework will know the path requested ??
|
|   the processPath() method of the 
|org.apache.struts.action.RequestProcessor
|Class will get the path from getPathInfo() ..
|
|   What does this method returns ??
|
|   And more over the processPath() method gets the path variable from
|request attributes javax.servlet.include.path_info and
|javax.servlet.include.servlet_path . Where are these values set ?? Which
|class of the framework sets these values ??
|
|  Pls let me know..
|
|Thanks
|Sateesh
|
|  
|
|
|"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
|ADDRESSEE and may contain confidential and privileged information.
|If the reader of this message is not the intended recipient,
|you are notified that any dissemination, distribution or copy of this 
|communication is strictly Prohibited. 
|If you have received this message by error, please notify us 
|immediately, return the original mail to the sender and delete the 
|message from your system."
|
|
|-
|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: Parsing error on startup

2003-08-14 Thread Navjot Singh
i also faced the same problem. when doing upgrade to 1.4.1_01 -> 03.
Then i migrated to 04 and voila! it works.

don't knwo exactly the root cause of the problem but 
seems to something with the class loaders.

navjot

|-Original Message-
|From: Guy Caseley [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 06, 2003 6:43 PM
|To: Struts Users Mailing List
|Subject: Re: Parsing error on startup
|
|
|Navjot,
|
|The version that I'm having the problem with is jdk1.4.0_02-b02 so this 
|could well be the problem - although just got some information that 
|suggests that this problem only occurs between 1.4.1 -> 1.4.2, which 
|ties in with what you say, but would mean that I shouldn't be seeing 
|this problem with 1.4.0.
|
|Has anyone experienced this problem with jdk1.4.0 on Tomcat4.1 startup?
|
|2003-08-05 06:31:31 StandardContext[/app1]: Servlet /app1 threw load() 
|exception javax.servlet.UnavailableException: Parsing error processing 
|resource path
|  at
|org.apache.struts.action.ActionServlet.initModuleConfig(ActionServl
|et.java:952)
|
|Thanks very much for the help,
|
|Guy.
|
|Navjot Singh wrote:
|
|> guess your jdk version is 1.4.1_03. upgrade to the latest one 1.4.1_04.
|> problem solved.
|> 
|> hth
|> navjot singh
|> 
|> |-Original Message-
|> |From: Guy Caseley [mailto:[EMAIL PROTECTED]
|> |Sent: Wednesday, August 06, 2003 4:57 PM
|> |To: [EMAIL PROTECTED]
|> |Subject: Parsing error on startup
|> |
|> |
|> |Hi,
|> |
|> |   I have a webapp that uses struts1.1-b3 and it runs fine on 
|> |Tomcat4.1.27/jdk1.3 on my PC (Win2k).
|> |
|> |   When I start Tomcat4.1.27/jdk1.4 on RedHat Linux, I get:
|> |
|> |2003-08-05 06:31:31 StandardContext[/app1]: Servlet /app1 threw load()
|> |exception javax.servlet.UnavailableException: Parsing error processing
|> |resource path
|> | at
|> |org.apache.struts.action.ActionServlet.initModuleConfig(ActionServl
|> |et.java:952)
|> |
|> |Has anyone seen this problem, or have any idea what it might be? Any 
|> |help would be greatly appreciated - I've tried everything that I could 
|> |think of.
|> |
|> |Thanks very much,
|> |
|> |   Guy
|> |
|> |
|> |
|> |-
|> |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: Parsing error on startup

2003-08-14 Thread Navjot Singh
guess your jdk version is 1.4.1_03. upgrade to the latest one 1.4.1_04.
problem solved.

hth
navjot singh

|-Original Message-
|From: Guy Caseley [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, August 06, 2003 4:57 PM
|To: [EMAIL PROTECTED]
|Subject: Parsing error on startup
|
|
|Hi,
|
|   I have a webapp that uses struts1.1-b3 and it runs fine on 
|Tomcat4.1.27/jdk1.3 on my PC (Win2k).
|
|   When I start Tomcat4.1.27/jdk1.4 on RedHat Linux, I get:
|
|2003-08-05 06:31:31 StandardContext[/app1]: Servlet /app1 threw load()
|exception javax.servlet.UnavailableException: Parsing error processing
|resource path
| at
|org.apache.struts.action.ActionServlet.initModuleConfig(ActionServl
|et.java:952)
|
|Has anyone seen this problem, or have any idea what it might be? Any 
|help would be greatly appreciated - I've tried everything that I could 
|think of.
|
|Thanks very much,
|
|   Guy
|
|
|
|-
|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: ActionForm Design Question

2003-08-02 Thread Navjot Singh

|> Question 1: Do I use conventional ActionForm?
|> Map-backed ActionForm? or DynaActionForm for this
|> project?
|
|If I were you, I would use the conventional ActionForm if
|most of the properties are Strings.

If your data is fixed on form, then it is good to have ActionForm.
More, you may use DynaActionForm if you don't wish to write a ActionForm
file ;-)

|>
|> Question 2: Which strategy should I use to transfer
|> values between tiers?  Setting an immutable value
|> object?  or transferring values by reflection
|> (BeanUtil)? or passing a Map?
|
|Then I would use the transerring mechanism in the BeanUtil package.

If your app is simple enough, you can use Map. If you know
your app is gonna expand like hell, invest time on BeanUtil.

Navjot Singh

|>
|> I highly value your opinions and advices.  Thanks.
|>
|
|Jing
|Netspread Carrier
|http://www.netspread.com
|
|
|> __
|> 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]
|
|


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



RE: Database Connection

2003-07-31 Thread Navjot Singh
yes, you can put your class file in webapp CP also - whichever way it works
for you. However, docs say that it should be under tomcat common dir.

Can you explain a little more why/how the connection behaviour is toggling?
Did you print the state of the connection before you use it?

rgds
navjot singh

|-Original Message-
|From: Marc Ende [mailto:[EMAIL PROTECTED]
|Sent: Thursday, July 31, 2003 5:19 PM
|To: Struts Users Mailing List
|Subject: Re: Database Connection
|
|
|Hi Navjot,
|
|I ran into trouble as I put it in the classpath you mentioned.
|(Connection works, connection works not, and so on)
|I think it's better to put it in the webapps classpath, if you're
|not using
|jndi.
|
|yours
|
|Marc
|
|
|Am Donnerstag, 31. Juli 2003 13:37 schrieb Navjot Singh:
|> the jar file for your sybase driver should in the class path of tha app
|> server.
|> If it's tomcat put your jar file in tomcat_home/common/lib
|
|
|-
|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: Database Connection

2003-07-31 Thread Navjot Singh
the jar file for your sybase driver should in the class path of tha app
server.
If it's tomcat put your jar file in tomcat_home/common/lib

it will work.
-navjot singh

|-Original Message-
|From: Chirag Mehta [mailto:[EMAIL PROTECTED]
|Sent: Thursday, July 31, 2003 5:01 PM
|To: Struts Users Mailing List
|Subject: Database Connection
|
|
|Hello,
|
|I have just started developing with Struts and was wondering if
|anyone could help me connect to a Sybase Database using my webapp?
|
|I have set up my JSP page, actionform and action. I have set the
|datasource properies in my config.xml and am calling them from my
|action. It is giving me a class not found exception like below.
|
|java.sql.SQLException: open: java.lang.ClassNotFoundException:
|com.sybase.jdbc2.jdbc.SybDriver
| at
|org.apache.struts.legacy.GenericDataSource.open(GenericDataSource.java:735)
| at
|org.apache.struts.action.ActionServlet.initModuleDataSources(Unknow
|n Source)
| at org.apache.struts.action.ActionServlet.init(Unknown Source)
| at javax.servlet.GenericServlet.init(GenericServlet.java:256)
| at
|org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrappe
|r.java:935)
|
|Anyone got any ideas what i maybe ding wrong.
|
|One other question. Does anyone know of any drivers that connect
|to a informix DB and how to use them?
|
|Sorry if this is a very basic question. I am only a first yr undergraduate!
|
|Chirag
|
|


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



RE: Problem with redisplay of form values when issuing error messages

2003-07-30 Thread Navjot Singh
it WILL redisplay the form with filled values.
say, you submit a filled form, some data was wrong, 
the same form will be displayed WITH filled-in values.

navjot

|-Original Message-
|From: Rodney Paul [mailto:[EMAIL PROTECTED]
|Sent: Wednesday, July 30, 2003 2:09 PM
|To: Struts Users Mailing List (E-mail)
|Subject: Problem with redisplay of form values when issuing error
|messages
|
|
|Hi All,
| 
|I am currently using the Struts MVC2 framework to develop a wizard 
|application.
|Upon reading the literature in regards to how Struts works, I 
|noticed that my application
|will does not re-display form values entered by the user if errors 
|are issued.
| 
|Is it possible to re-display form values from an ActionForm if the 
|validate method returns
|ActionErrors. If so, how do you achieve this? Do you need to store 
|anything in a session object?
| 
|Is it possible to re-display form values from an Action class if 
|we return ActionErrors.
| 
| 
|Cheers
|Rodney
|

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



RE: Development time using Struts,

2003-07-29 Thread Navjot Singh
I agree with puneet saying that struts does saves a lot of time in
development of large apps. After all, frameworks are meant to provide a set
of services and also defines the boundaries of the system in which the app
developer should put his/her efforts in.

Even with frameworks around, developers need to have standard practice of
coding so as to keep the code flows almost same for the entire app. With
that in place, it's merely copy and paste for the routine jobs and you get
more time to focus on the actual business logic. However, good IDEs also
save lot of time.

So, if you know a framework that suits your needs, it WILL save lots of
time.

regards
Navjot Singh


|-Original Message-
|From: Konstadinis Euaggelos [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, July 29, 2003 1:26 PM
|To: Struts Users Mailing List
|Subject: Development time using Struts,
|
|
|Hi to all,  I want to raise a question here about development time
|using Struts,
|
|I am using Struts about 4-months now,
|I found it a very good framework for developing web-applications,
|but the devolpment time in contrary with the  classicc way(jsp, serlvet)
|is much more using Struts.
|
|Also i find it useless when you use ejb in your applications, you
|have to make  "MANY" iteration to pass parameters & results from
|front-end to back-end and vice-versa, which of cource costs to
|much in performance.
|
|
|I would like to hear other struts-developers for their experience.
|
|
|Vangos.
|
|
|
|
|
|
|


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



RE: need suggestion on logic

2003-07-28 Thread Navjot Singh
very simple. say user fills in text field and press enter.

1. Pass the control to an action "Checker".
2. Checker will verify if the process needs login.
3. If NOT, case is clear.
4. If YES,
   + Store the request state variables in some object.
   + Save that object in Session.
   + Pass Control to "Ask Password" page.
   + "Passwd Manager" checks if pass is OK?
  + If NOT re-display the "Ask Password".
  + If YES,
- save pass state for Checker's sake.
- retrieve the request state variables.
- Dispatch a request to checker again.
  This case will be treated same as 2,3 steps.

Checker can be implemented either using
+ Filter OR
+ Some method in Base Action
+ extend request controller.

See what suits you.
-Navjot Singh

PS - If all you are looking for is general login system. See CMA/Realm
Security.


|-Original Message-
|From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]
|Sent: Monday, July 28, 2003 8:03 PM
|To: [EMAIL PROTECTED]
|Subject: need suggestion on logic
|
|
| Hi,
| I am building a web application using struts1.1, and
| this is my requirement,
| There is a jsp where in user will enter data in text
| field, and then press enter, this will submit to a
| Action class, this action class must decide wether a
| relogin page has to be displayed or not, and if yes
| then display a relogin page, the user will enter the
| password, if the password is correct, perform the
| task  of entering data in database, if the password
|is
| wrong  or user presses cancel, then take him back to
|   the jsp from where the user came, and populate all
|the data which was entered in jsp,
| If there is no need for relogin screen, enter the
| data to  database.
| the puzzle here is how do i write that common Action
| class which will handle to display the login page,
| and
| other Action class which will validate the password,
| and forward the request to other class
| So i need to remmember where the request came from
| and
| where it has to go??
| need help on this
|
| Ashish
|
|
|
|__
|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]



  1   2   >