RE: Deploying web app (.ear = .jar + .war) under Weblogic with Stru ts

2003-10-01 Thread Varun Garg
I have the ejb's and the war working without making
the duplicate jar files.

Basically put in a MANIFEST.MF file with the classpath
in three places and it works for me.

Basically move all the common jars to the root of the
ear.

Root of the ear looks like
ejb.jar
app.war
struts.jar
etc.jar
META-INF
 - MANIFEST.MF

And put the MANIFEST.MF in both the ejb.jar and also
the app.war.

IN ejb.jar it goes at the root, just like the ear
com
META-INF
 -MANIFEST.MF
 -ejb-jar.xml

And in the war file
WEB-INF/classes/com
WEB-INF/classes/META-INF
WEB-INF/classes/META-INF - MANIFEST.MF


This works great for me, no class duplication.


--- [EMAIL PROTECTED] wrote:
> We have pretty similar ear file for our application
> and it works fine. check if 
> your struts.jar is in WEB-INF\lib folder.
> 
> 
> -Original Message-
> From: David.Karr [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 01, 2003 11:28 AM
> To: struts-user
> Subject: RE: Deploying web app (.ear = .jar + .war)
> under Weblogic with
> Struts
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> > 
> > I am trying to deploy a .ear application under Bea
> Weblogic 7.0 using
> > Struts 1.1.
> > 
> > What happens (funny) is that if I deploy my
> webapp.war 
> > (containing the web
> > module and Struts library) and webapp.jar
> (containing ejbs) 
> > at the same
> > time, everything works properly and the web
> application 
> > integrates happily
> > with ejbs.
> > 
> > But if I merge the two files into a .ear, it
> deploys 
> > correctly, but when I
> > launch the application I get the following error
> message:
> > 
> > java.lang.NoClassDefFoundError:
> org/apache/struts/action/ActionForm
> 
> I'm assuming you're pursuing this with BEA Support?
> 
> You might turn on "-verbose:class" on the JVM.  It
> might give you a
> clue.
> 
> Check to see what other jars are in the EAR
> classpath (like in the
> appserver).
> 
>
-
> 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: LabelValueBean - 3 fields?

2003-09-24 Thread Varun Garg
It is easier to use this class for Display purposes
just like the LabelValueBean.



-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 24, 2003 3:23 PM
To: Struts Users Mailing List
Subject: RE: LabelValueBean - 3 fields?


If you need a class that stores 10 Strings, you should
be using an array
instead of 10 different variables.

David

--- Varun Garg <[EMAIL PROTECTED]> wrote:
> I created a StringsClass with upto 10 variables.
> 
> 
> package com.xxx.valueobjects;
> 
> import java.io.Serializable;
> import java.util.Comparator;
> 
> public class StringsClass  implements Serializable,
> Comparable  {
> private String var1 = "";
> private String var2 = "";
> private String var3 = "";
> private String var4 = "";
> private String var5 = "";
> private String var6 = "";
> private String var7 = "";
> private String var8 = "";
> private String var9 = "";
> private String var10 = "";
> 
>public int compareTo(Object inObj) {
>StringsClass in  = (StringsClass) inObj;
>String first = var1 + var2 + var3 + var4 +
var5
> + var6 + var7 + var8 + var9 + var10;
>String second = in.getVar1() + in.getVar2() +
> in.getVar3() + in.getVar4() + in.getVar5() +
> in.getVar6();
>second = second + in.getVar7() +in.getVar8()
> +in.getVar9() +in.getVar10();
>return first.compareTo(second);
>}
> 
> public StringsClass(String var1) {
> this.var1 = var1;
> }
> 
> public StringsClass(String var1, String var2) {
> this.var1 = var1;
> this.var2 = var2;
> }
> 
> public StringsClass(String var1, String var2,
> String var3) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5, String var6)
{
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> this.var6 = var6;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5, String var6,
> String var7) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> this.var6 = var6;
> this.var7 = var7;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5, String var6,
> String var7, String var8) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> this.var6 = var6;
> this.var7 = var7;
> this.var8 = var8;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5, String var6,
> String var7, String var8, String var9) {
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> this.var6 = var6;
> this.var7 = var7;
> this.var8 = var8;
> this.var9 = var9;
> }
> 
> public StringsClass(String var1, String var2,
> String var3, String var4, String var5, String var6,
> String var7, String var8, String var9, String var10)
{
> this.var1 = var1;
> this.var2 = var2;
> this.var3 = var3;
> this.var4 = var4;
> this.var5 = var5;
> this.var6 = var6;
> this.var7 = var7;
> this.var8 = var8;
> this.var9 = var9;
> this.var10 = var10;
> }
> 
> public String getVar1() {
> return var1;
> }
> 
> public void setVar1(String var1) {
> this.var1 = var1;
> }
> 
> public String getVar2() {
> return var2;
> }
> 
> public void setVar2(String var2) {
> this.var2 = var2;
> }
> 
> public String getVar3() {
> return var3

RE: LabelValueBean - 3 fields?

2003-09-24 Thread Varun Garg
I created a StringsClass with upto 10 variables.


package com.xxx.valueobjects;

import java.io.Serializable;
import java.util.Comparator;

public class StringsClass  implements Serializable,
Comparable  {
private String var1 = "";
private String var2 = "";
private String var3 = "";
private String var4 = "";
private String var5 = "";
private String var6 = "";
private String var7 = "";
private String var8 = "";
private String var9 = "";
private String var10 = "";

   public int compareTo(Object inObj) {
   StringsClass in  = (StringsClass) inObj;
   String first = var1 + var2 + var3 + var4 + var5
+ var6 + var7 + var8 + var9 + var10;
   String second = in.getVar1() + in.getVar2() +
in.getVar3() + in.getVar4() + in.getVar5() +
in.getVar6();
   second = second + in.getVar7() +in.getVar8()
+in.getVar9() +in.getVar10();
   return first.compareTo(second);
   }

public StringsClass(String var1) {
this.var1 = var1;
}

public StringsClass(String var1, String var2) {
this.var1 = var1;
this.var2 = var2;
}

public StringsClass(String var1, String var2,
String var3) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
}

public StringsClass(String var1, String var2,
String var3, String var4) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5, String var6) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
this.var6 = var6;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5, String var6,
String var7) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
this.var6 = var6;
this.var7 = var7;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5, String var6,
String var7, String var8) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
this.var6 = var6;
this.var7 = var7;
this.var8 = var8;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5, String var6,
String var7, String var8, String var9) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
this.var6 = var6;
this.var7 = var7;
this.var8 = var8;
this.var9 = var9;
}

public StringsClass(String var1, String var2,
String var3, String var4, String var5, String var6,
String var7, String var8, String var9, String var10) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
this.var5 = var5;
this.var6 = var6;
this.var7 = var7;
this.var8 = var8;
this.var9 = var9;
this.var10 = var10;
}

public String getVar1() {
return var1;
}

public void setVar1(String var1) {
this.var1 = var1;
}

public String getVar2() {
return var2;
}

public void setVar2(String var2) {
this.var2 = var2;
}

public String getVar3() {
return var3;
}

public void setVar3(String var3) {
this.var3 = var3;
}

public String getVar4() {
return var4;
}

public void setVar4(String var4) {
this.var4 = var4;
}

public String getVar5() {
return var5;
}

public void setVar5(String var5) {
this.var5 = var5;
}

public String getVar6() {
return var6;
}

public void setVar6(String var6) {
this.var6 = var6;
}

public String getVar7() {
return var7;
}

public void setVar7(String var7) {
this.var7 = var7;
}

public String getVar8() {
return var8;
}

public void setVar8(String var8) {
this.var8 = var8;
}

public String getVar9() {
return var9;
}

public void setVar9(String var9) {
this.var9 = var9;
}

public String getVar10() {
return var10;
}

public void setVar10(String var10) {
this.var10 = var10;
}

public String toString(){
StringBuffer sb = new StringBuffer();
sb.append("StringClass: [\n");
sb.append("var1=" + var1 + "\n");
sb.append("var2=" + var2 + "\n");
sb.append("var3=" + var3 + "\n");
sb.append("var4=" + var4 + "\n");

Re: Page Title

2003-09-22 Thread Varun Garg
I did this.










--- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> Bryce Fischer wrote:
> 
> >>How do i assign different title for each page
> using tiles. Following is my tile layout which has
> title "My Site Name". And it has Header, Side Menu,
> BODY, Footer.
> >>Should i have  in each BODY jsp ?
> >> 
> >>Is there any short cut to get the page name and
> over ride the main layout title ?
> >>
> >>
> >
> >Definitely.
> >
> >Put this in your header:
> >
> >
> >
> >Now, in your tiles-def.xml file, put this:
> >
> > name="browse.costcenters">
> >
> > value="/custom/browse-costcenters.jsp"/>
> >
> >
> >  
> >
> I'm almost embarrassed to ask this :-), but is there
> a way to localize 
> the replacement title?
> 
> Craig McClanahan
> 
> 
> 
> 
>
-
> 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 question

2003-09-22 Thread Varun Garg
There are many ways to store the requested page and
then redirect to the login action and once it is done
pass it back to thr requested resource, if it is a
matter of just the url with the query parameters you
can use the HTTP-REFERER from the header to see if a
different page was requested. 

Or another way to do is before doing the forward to
the login action, put the requested resource info
(url, form post etc) inside the session or hidden
fields in the login page and get them back and forward
accordingly.

Varun
--- Lázaro_Miguel_Fung <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> How I can invoke a login action from any pages thats
> require user be logged,
> and after valid logon, return to the page that the
> user was.
> 
> TIA
> LFung
> 
> 
>
-
> 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: Frames Question

2003-09-22 Thread Varun Garg
Frames are like indivdual request. So think about it
this way, how would you send the information from one
request to next request in the same sesssion.

Usual way is to pass parameters in url's, another way
is to do form posts with the data, the other way is to
put info in session and the retrieve it.

So, it depends on your particular problem, amount of
data, nature of data etc, on how to organize that. But
the basic thing is that when you use frames, they are
seperate request for the server and should be handled
accordingly.

Varun

usually try to send parameters to 
--- [EMAIL PROTECTED] wrote:
> Hi All,
> 
> Have an app that mixes struts, tiles and inline
> frames.
> 
> The frames are there as the design team likes them. 
> I tried to talk them
> out of it.
> 
> Problem seems to be that when i send a request to an
> action, the attribute
> added to the request can be seen by the main page
> but not the iframe when
> the page is rendered.
> 
> Can anyone shed light on what is actually happening?
> 
> Does anyone have any suggestions, other than get rid
> of the frames?
> 
> Regards
> 
> Ross Rotherham
> 
> 
> 
>
-
> 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 + EJB

2003-07-17 Thread Varun Garg
You should create a actionform with all the incoming parameters and
whatever values that you might need to pass back.

Then in the action you can check for those values.
Say the ActionForm would contain a property called "category" and you
would have getter and setter for that. Then in the Action instead of
doing request.getParameter("category"); you would just do a
form.getCategory(); and also for outgoing values just create another
property for example if you have a collection that you want to pass to
the jsp page, say the jsp page wants to show a list of something.

You can then create a property in the form for that collection say
"coll" and then in the Action after getting the values from the
SessionEJB set them in the form. Then you can access them on the page
using the standard tags from struts.
form.setColl(lsb.getCollection(form.getCategory());

Varun

-Original Message-
From: Marc Gibert Ginestà [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 1:04 PM
To: Struts Users Mailing List
Subject: Re: Struts + EJB


Varun Garg wrote:
> I would call the SessionEJB from the actions and copy over the 
> contents that need to be displayed either in the ActionForm or a 
> VO/DTO in the form and then use that to display the information in the

> JSP.
> 
> What is the SessionEJB returning you?? It should be some object 
> serializable and that should be able to fit in the ActionForm.

The sessionEJB could return anything, depending on the method called. 
 From a Collection to a single value. The initial idea was to make 
getters for each value to be seen on the view.

We weren't planning on using ActionForms from the start. At the moment 
we're using URLs to pass parameters, like "showdetails.do?category=3" 
and getting the value of the parameter passed, in the Action with a 
request.getParameter("category");

I like your solution (use the ActionForm), could you provide an example 
of getting the category parameter from it and then add the result values

in the ActionForm?

Thanks in advance.

-- 
Sincerely,
Marc Gibert Ginestà   e-mail: [EMAIL PROTECTED]
Cometa Technologies, S.L. URL: http://www.cometatech.com
Telf.: 93 231 84 90   Fax: 93 245 93 43



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



RE: JSP exception

2003-07-17 Thread Varun Garg
The best way I like is to use the ExceptionHandler. Catch the exceptions
and then do whatever you would like to do with it. You can call your
error page after that.

Varun

-Original Message-
From: Peter Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 12:33 PM
To: Struts Users Mailing List
Subject: JSP exception


Hi all,

Does anyone know how I can get access to the exception put into
pageContext on an error jsp page?  I am trying to do logging from an
action, but haven't been able to get the exception to log it.

Thanks, Peter

-- 
Peter Smith
Software Engineer
InfoNow Corporation


-
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 + EJB

2003-07-17 Thread Varun Garg
I would call the SessionEJB from the actions and copy over the contents
that need to be displayed either in the ActionForm or a VO/DTO in the
form and then use that to display the information in the JSP.

What is the SessionEJB returning you?? It should be some object
serializable and that should be able to fit in the ActionForm.

Varun

-Original Message-
From: Marc Gibert Ginestà [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 12:16 PM
To: 'Struts Users Mailing List'
Subject: Struts + EJB


Hi!

We're starting a project based on Struts with EJBs for the business 
logic and JSPs for the view.

So far, we've successfully coded Actions that call stateful Session EJBs

that talk to Entity EJBs.

The problem we have is on the view (JSPs). How is the JSP supposed to 
talk to the Session EJB instantiated by the Action class?

One solution we see is to put the instantiated Session EJB in the HTTP 
session and then call its getters from the JSP. This works.

Another solution would be to code a sort of DTO between the Action and 
the EJB so the Action talks to the DTO, the DTO to the EJBs, and then 
the JSP could do a jsp:useBean on the DTO. This seems a lot overkill and

bloat.

I've seen on some pages talk about some Struts taglibraries specific to 
EJB, but couldn't find them. Would these solve our problems? Where are
they?

Is there a better way of doing this?
Has anybody had the same doubt?

Thanks in advance.

-- 
Sincerely,
Marc Gibert Ginestà   e-mail: [EMAIL PROTECTED]
Cometa Technologies, S.L. URL: http://www.cometatech.com
Telf.: 93 231 84 90   Fax: 93 245 93 43



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



RE: Select Tag and Options Tag

2003-07-17 Thread Varun Garg
   
Select


   

-Original Message-
From: Silverio Wagner Silva(Secorp) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 17, 2003 12:16 PM
To: 'Struts Users Mailing List'
Subject: Select Tag and Options Tag


I have difficulties to use the tags "Select" and "Option" to display
data from an ArrayList. So, I need a complete example of using them.

Could anyone help me?

Thanks in advance.

Silvério.

-
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: error/message handling: saveErrors

2003-07-03 Thread Varun Garg
Instead of doing a new ActionErrors I have a function in my base Action
(U can just put it in the action that your are working on Baction).

public ActionErrors getErrors(HttpServletRequest request){
if (request.getAttribute(ERROR_KEY) != null) {
return (ActionErrors) request.getAttribute(ERROR_KEY);
}
return new ActionErrors();
}

Use this inside the execute.
ActionErrors errors = getErrors(request);

 
Varun

-Original Message-
From: Denis Wang [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 10:48 AM
To: Struts Users Mailing List
Subject: struts: error/message handling: saveErrors


Hello, all,

I have the following problem:
In ActionA{

ActionErrors errors = new ActionErrors();
errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(
"Afailed" ) );
saveErrors( request, errors );
}

In ActionB{

ActionErrors errors = new ActionErrors();
errors.add( ActionErrors.GLOBAL_ERROR, new ActionError(
"Bfailed" ) );
saveErrors( request, errors );
}

When ActionA returns it will forward the processing to ActionB and then
the "Bfailed" error will override the "Afailed" error.

How can I show both "Afailed" and "Bfailed" error messages?  Thanks a
lot! Denis



-
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: Off Topic

2003-06-27 Thread Varun Garg
Who cares about those sponsored links, I don't even look at the ad space
when doing a search. The real search results are all JAVA.

Cheers

-Original Message-
From: Tim Jones [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 27, 2003 2:01 PM
To: Struts Users Mailing List
Subject: Re: Off Topic


Yeah!  That STINKS fer shure!  Just goes to show that if you throw
enough money around, you can pretty much get whatever you want!
 

"Jamie M. Guillemette" <[EMAIL PROTECTED]> wrote:
Follow these steps. go to goole ( www.google.ca ) type in java and then
enter.

Is it not a real piss off that microsoft has the first link to come up
directly targetting java programmers to move away from java.?





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



-
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!



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



RE: getting a file path to /WEB-INF from a HttpSession

2003-06-27 Thread Varun Garg
If you are tring to access a resource then u can do a
getClass().getClassLoader() and get the resource from the
WEB-INF/classes folder.

I don't think this is the right or the best way, but one way you could
do it is, get access to a resource using the above stated methods and
then from the resource get access to the other files relaively.

But this method works only in some app servers.

The best I would suggest is jus put your resources in WEB-INF/classes
and access them using getClass().getClassLoader()

Varun

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 27, 2003 11:44 AM
To: Struts Users Mailing List
Subject: getting a file path to /WEB-INF from a HttpSession


Hi all,

I'm struggling with this a bit.

I have a class, that I call from an Action class. I am trying to get the
path to WEB-INF (C:\tomcat\webapps\myApp\WEB_INF) but all I have to play
with is the HTTPServletRequest/Responce. I can do it in a class
extending javax.servlet.Servlet, but I haven't a clue with this way.

My books and web searches have turned up either zip or useless junk.

Any help would be appreciated!

Cheers

Simon

"I have often wondered how it is that every man loves himself more than
all the rest of men, but yet sets less value on his own opinion of
himself than on the opinion of others." -- Georg Christoph Lichtenberg

Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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



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



RE: How to read < init-parm> defined in web.xml in an Action class

2003-06-25 Thread Varun Garg
Try this

this.servlet.getServletConfig().getInitParameter() 


-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 9:10 AM
To: [EMAIL PROTECTED]
Subject: How to read < init-parm> defined in web.xml in an Action class


Hi

I have this entry in my web.xml file


  developer-test-id
   testmode


How can I get the value (testmode) in my action class.

In a servlet we I could do it like this

public void init(ServletConfig config) throws ServletException
  {
super.init(config);
String  ssoId = config.getInitParameter("developer-test-id");
   }

How can I achieve the same in Struts. This is required as once the
development is done and we deploy the access will be thru SingleSign On.
So I want to use this as a switch.

Thanks



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



RE: accessing servlet from an ActionForm

2003-06-25 Thread Varun Garg
You will have to do some more work to get the System.setProperty(),
cause this needs to happen before the ActionServlet is initialized. One
way to do is create a StartupServlet and have it load before the
ActionServlet and in the init method of StartupServlet put the
System.setProperty.

The other way should be fairly simple. Just add that parameter to the
startup and it should work.

Varun

-Original Message-
From: Kumar, Kiran [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 7:46 AM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm



I will try this. but I dont know where we can set the 

System.setProperty();;;

Thanks

KiranKumar (Raj)
ext 7203


-Original Message-----
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:56 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


Your problem I think the config file.

There could be two problems. One is that the parser that WAS4 is using
aint right, you can try changing that by specifying a parameter when you
start the or do the System.setProperty

-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFac
tory
Impl


System.setProperty("javax.xml.parsers.SAXParserFactory",
"org.apache.xerces.jaxp.SAXParserFactoryImpl");

The second thing toc heck if this does not work is the struts-config.xml
or the file that you have specified, I would just open it in IE to make
sure its not broken.

The first should really solve your problem.



-Original Message-
From: Kumar, Kiran [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 4:39 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


we.. I have created a simple name search application where user enters
his name and I will search in a DB to look for the name. entered. but 
when I try to execute the application, I am getting the following
exception and server WAS4 will not start properly I am not exactly sure
where the problem is. 

so I am looking for a working example so that I can see where I am
missing in my configuration.. this is very urgent for me


-EXCEPTION
MESSAGE--START-

[INFO] PropertyMessageResources - -Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true [INFO]
PropertyMessageResources - -Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
javax.xml.parsers.ParserConfigurationException: AElfred parser is
non-validating
at
net.sf.saxon.aelfred.SAXParserFactoryImpl.newSAXParser(SAXParserFactoryI
mpl.
java:34)
at
org.apache.commons.digester.Digester.getParser(Digester.java:569)
at
org.apache.commons.digester.Digester.getXMLReader(Digester.java:607)
at
org.apache.commons.digester.Digester.parse(Digester.java:1284)
at
org.apache.struts.action.ActionServlet.initApplicationConfig(ActionServl
et.j
ava:860)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doInit(ServletManage
r.ja
va:802)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(StrictLifecyc
leSe
rvlet.java:141)
at
com.ibm.servlet.engine.webapp.PreInitializedServletState.init(StrictLife
cycl
eServlet.java:254)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycl
eSer
vlet.java:107)
at
com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:3
88)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.j
ava:
84)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppSer
vlet
Manager.java:226)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(
WebA
ppServletManager.java:357)
at
com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1010
)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:133)
at
com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:234)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:139)
at
com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.jav
a:65
2)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:617)
at
com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:
333)
at
com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java
:349
)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
at
com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519

RE: Checking for a null property

2003-06-24 Thread Varun Garg
I think you can use empty also, but present also works for me.

The documentation also suggests that 
property - Checks for the existence of a non-null property value,
returned by a property getter method on the JSP bean (in any scope) that
is specified by the name attribute. Property references can be simple,
nested, and/or indexed.

I have used the empty more for collections to make sure there is
something in there.

Varun
 

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 5:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Checking for a null property


But doesn't the present tag just check whether the property is present,
and 
not if it is null or not? I was having some strange actions with this.



---
Thanks...
Mick Knutson
---





>From: "Varun Garg" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Checking for a null property
>Date: Tue, 24 Jun 2003 17:00:28 -0500
>
>
>
>
>
>
>-Original Message-
>From: Jindal, Ashwini [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 24, 2003 4:57 PM
>To: [EMAIL PROTECTED]
>Subject: Checking for a null property
>Importance: High
>
>
>Anyone,
>
>Can anyone please help me with the following situation?
>
>I am trying to display the Agent's full Name. Now it works fine as long

>as the Agent has a valid full Name. As soon as Agent is null, I get a 
>Null Pointer. I want to check
>
>   
>
>   if the agent is null
>   then do something
>
>Can please tell me how I can make this check?
>
>Thank you,
>...AJ
>
>-
>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]
>

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


-
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: Checking for a null property

2003-06-24 Thread Varun Garg





-Original Message-
From: Jindal, Ashwini [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: Checking for a null property
Importance: High


Anyone,

Can anyone please help me with the following situation?

I am trying to display the Agent's full Name. Now it works fine as long
as the Agent has a valid full Name. As soon as Agent is null, I get a
Null Pointer. I want to check 



if the agent is null 
then do something

Can please tell me how I can make this check?

Thank you,
...AJ

-
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: accessing servlet from an ActionForm

2003-06-24 Thread Varun Garg
ervletState.init(StrictLife
cycl
eServlet.java:254)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(StrictLifecycl
eSer
vlet.java:107)
at
com.ibm.servlet.engine.webapp.ServletInstance.init(ServletManager.java:3
88)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.ibm.servlet.engine.webapp.ServletManager.addServlet(ServletManager.j
ava:
84)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppSer
vlet
Manager.java:226)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(
WebA
ppServletManager.java:357)
at
com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1010
)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:133)
at
com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:234)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:139)
at
com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.jav
a:65
2)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:617)
at
com.ibm.ws.runtime.StandardServer.initializeModules(StandardServer.java:
333)
at
com.ibm.ws.runtime.StandardServer.initializeRuntime0(StandardServer.java
:349
)
at com.ibm.ws.runtime.Server.initializeRuntime(Server.java:884)
at
com.ibm.ws.runtime.StandardServer.main(StandardServer.java:519)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)
at
com.ibm.etools.websphere.tools.runner.api.ServerRunner$1.run(ServerRunne
r.ja
va)
[ERROR] ActionServlet - -Parsing error processing resource path
/WEB-INF/struts-config.xml 
-END
MESSAGE---

Thanks

KiranKumar (Raj)
ext 7203


-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:34 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


What type of example are you looking for???



-Original Message-
From: Kumar, Kiran [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 4:08 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


can I get a solid example in struts with latest features included

varun: I need one with html-el if possible
Thanks

KiranKumar (Raj)
ext 7203


-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:05 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


I would access the ServletContext from the execute or the perform method
rather than the constructor.

this.servlet.getServletContext().getAttribute("XXX")

This is what I use from inside the execute and it works great.


-Original Message-
From: rab yazbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: accessing servlet from an ActionForm


Hi.

I am trying to get access to the servlet container
(getServletContext().getAttribute(attrName)) from an
ActionForm but I receive an error
(NullPointerException). 

It is strange because the controller servlet instance
(ActionServlet) exist in the ActionForm, but every
time I try to access it, it gives me an error (NullPointerException).

The ActionForm is crated by an , and I
am trying to access this servlet from within the
constructor of this ActionForm (is it good practice to
do that?)

That attributes were already stored successfully
(plug-in) at the start-up of the application.

Help please, thank you in advance.

Rab.


__
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

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



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

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



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

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



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



RE: accessing servlet from an ActionForm

2003-06-24 Thread Varun Garg
What type of example are you looking for???



-Original Message-
From: Kumar, Kiran [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 4:08 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


can I get a solid example in struts with latest features included

varun: I need one with html-el if possible
Thanks

KiranKumar (Raj)
ext 7203


-Original Message-----
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 5:05 PM
To: 'Struts Users Mailing List'
Subject: RE: accessing servlet from an ActionForm


I would access the ServletContext from the execute or the perform method
rather than the constructor.

this.servlet.getServletContext().getAttribute("XXX")

This is what I use from inside the execute and it works great.


-Original Message-
From: rab yazbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: accessing servlet from an ActionForm


Hi.

I am trying to get access to the servlet container
(getServletContext().getAttribute(attrName)) from an
ActionForm but I receive an error
(NullPointerException). 

It is strange because the controller servlet instance
(ActionServlet) exist in the ActionForm, but every
time I try to access it, it gives me an error (NullPointerException).

The ActionForm is crated by an , and I
am trying to access this servlet from within the
constructor of this ActionForm (is it good practice to
do that?)

That attributes were already stored successfully
(plug-in) at the start-up of the application.

Help please, thank you in advance.

Rab.


__
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

-
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: accessing servlet from an ActionForm

2003-06-24 Thread Varun Garg
I am not sure of the problem, but when an ActionForm is initialized the
servlet is set automatically, so it should work from the Form also. 

Paste some more code snippets to explain whats happening, like the
construtor and the jsp. Are you going directly to the jsp bypassing the
action or your action is forwarding the request to jsp and even if you
are it should work.

 

-Original Message-
From: rab yazbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 4:11 PM
To: Struts Users Mailing List
Subject: RE: accessing servlet from an ActionForm


But i am using it from within the ActionForm and not
from the ActionServlet. And with the ActionForm, I am
afraid that the "validate" and the "reset" are not
called by the , this is why i am using the constructor. any
idea?

 --- Varun Garg <[EMAIL PROTECTED]> wrote: > I
would access the ServletContext from the execute
> or the perform method
> rather than the constructor.
> 
> this.servlet.getServletContext().getAttribute("XXX")
> 
> This is what I use from inside the execute and it
> works great.
> 
> 
> -Original Message-
> From: rab yazbeck [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 24, 2003 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: accessing servlet from an ActionForm
> 
> 
> Hi.
> 
> I am trying to get access to the servlet container
> (getServletContext().getAttribute(attrName)) from an ActionForm but I 
> receive an error (NullPointerException).
> 
> It is strange because the controller servlet
> instance
> (ActionServlet) exist in the ActionForm, but every
> time I try to access it, it gives me an error (NullPointerException).
> 
> The ActionForm is crated by an , and I
> am trying to access this servlet from within the
> constructor of this ActionForm (is it good practice
> to
> do that?)
> 
> That attributes were already stored successfully
> (plug-in) at the start-up of the application.
> 
> Help please, thank you in advance.
> 
> Rab.
> 
> 
> __
> Yahoo! Plus
> For a better Internet experience http://www.yahoo.co.uk/btoffer
> 
>
-
> 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]
>  

__
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

-
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: Looking for ideas for action servlet checking for logged in user.

2003-06-24 Thread Varun Garg
One way I did in the past was using a Servlet Filter where I would read
a file to see what action is authorized to what role.

I created a file with the mapping of path's to roles.




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: Looking for ideas for action servlet checking for logged in
user.


I have a webapp which have several pages which require the user to be
logged in(have a httpSession with a "usercontainer" object stored) , and
a few pages that doesn't require a log in(the log-in page, references,
indexes...). All pages are fronted by actions. My current solution is to
check for valid login in every action class that needs to protect its
invocation. That seems tedious. I though about extending the action
servlet to do it, but then it would check for all requests. And I do
want to distinguish between if the user is
authorized(isUSerInRole) and if he/she is even logged in, so I can't use
the role parameter in the action element.

My next idea is extending the action servlet pluss adding parameters
that can go into the action element in the struts-config.xml file. (some
thing like  ) This would require my action servlet to know about
my userContainer stored in the httpsession. Pluss modifying the
struts-config file. I haven't looked into how hard this is, figure I'd
ask someone who's run into this before.

Any other good approaches, or should I just stick with what I got?(check
individually in every action)

thanks,
Henrik Bentel




-
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: accessing servlet from an ActionForm

2003-06-24 Thread Varun Garg
I would access the ServletContext from the execute or the perform method
rather than the constructor.

this.servlet.getServletContext().getAttribute("XXX")

This is what I use from inside the execute and it works great.


-Original Message-
From: rab yazbeck [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: accessing servlet from an ActionForm


Hi.

I am trying to get access to the servlet container
(getServletContext().getAttribute(attrName)) from an
ActionForm but I receive an error
(NullPointerException). 

It is strange because the controller servlet instance
(ActionServlet) exist in the ActionForm, but every
time I try to access it, it gives me an error (NullPointerException).

The ActionForm is crated by an , and I
am trying to access this servlet from within the
constructor of this ActionForm (is it good practice to
do that?)

That attributes were already stored successfully
(plug-in) at the start-up of the application.

Help please, thank you in advance.

Rab.


__
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer

-
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: JSP's taking too long in websphere

2003-06-24 Thread Varun Garg
I would try breaking up the jsp and put the statements that I suggested
to see what part of the jsp is taking long.

Once I had a problem with one drop down that was taking a long time,
when I was using the html:options tag.

I just a custom java to overcome the slow down, I guess that the
html:options tag uses reflections and sometimes it can be a little slow
when there are 2 many things in the dropdown.

I also created a custom tag lib to use the method name vs the property
names and that was also slightly faster, but the first thing I would do
is isolate what statement or statements are taking long time in the jsp
page, by putting the time statements in between.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 11:31 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


Thank you, Varun.
Yes, the JSP's only take long. I would start opening files from the
hierarchy, and only when I open the JSP's, it takes a long time. Yes, I
do have a couple of drop downs and radio buttons.

Johnny, long = 13 sometimes 15 seconds. Unbelievable long and only for
the JSP's! and yes, I've rebooted my machine many times.

If this is the case, then I'm pretty sure it's because of the complexity
of my JSP.

-Original Message-
From: Poon, Johnny [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 12:26 PM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


I think Varun had some very good suggestion.

I will not say WSAD is a fast IDE by any mean, but how long is "long"
for you?  A second or 2?  I have a 1GB of CPU and 1GB of Mem running NT,
except to bring up WSAD, it runs ok for me in general.  Along with all
the suggestions that Varun had, have you try to reboot your machine? ;-)

JP

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 11:20 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


Do you have lot of lists on your page, do you use drop downs etc and how
is the length of the drop downs.

What is the approximate size of the page being delivered. I would check
all the parameters to see what is the size of the page that you are
rendering, what is size of the lists etc.

It can take long depending on the amount of processing, and are you sure
that it is the jsp page which is taking long?

Also I would put some statements like 
 long stTime = System.currentTimeMillis();
At the starting and 
log.debug("time before forward the request:" +
(System.currentTimeMillis() - stTime));
Before the end of the page to really see what is the time being spent in
rendering the page.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 11:08 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


Johnny,

It is still taking a long time.. even after I checked off those options!
None of my other files take this long - except for the JSP's.

-Original Message-
From: Poon, Johnny [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 11:40 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


What is the CPU and Memory of your computer?  Sometime it could be
simply lack of power to run WSAD.

Another thing you can try is to turn off "Perform build automatically on
resource modification" and "Refresh Workspace on startup".  You can find
these 2 options in "Window->Preferences->Workbench".

HTH.

JP



-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


I'm sure there's an option to turn that off somewhere.  What version are
you running?

Websphere tends to be kinda slow.  I've had some issues with that,
especially in version 4 and version 5 integration edition.

- Keith


-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 11:18 AM
To: 'Struts Users Mailing List'
Subject: JSP's taking too long in websphere


Hello everyone,

I work with strtus framework and use websphere. The problem is that it
takes a lot of time to open, load, or save my JSP pages. Could it be
because websphere compiles everything (even when I open the page?) if
yes, is there any option to turn that off?

I appreciate any suggestion

Mona 




*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any 

RE: JSP's taking too long in websphere

2003-06-24 Thread Varun Garg
Do you have lot of lists on your page, do you use drop downs etc and how
is the length of the drop downs.

What is the approximate size of the page being delivered. I would check
all the parameters to see what is the size of the page that you are
rendering, what is size of the lists etc.

It can take long depending on the amount of processing, and are you sure
that it is the jsp page which is taking long?

Also I would put some statements like 
 long stTime = System.currentTimeMillis();
At the starting and 
log.debug("time before forward the request:" +
(System.currentTimeMillis() - stTime));
Before the end of the page to really see what is the time being spent in
rendering the page.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 11:08 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


Johnny,

It is still taking a long time.. even after I checked off those options!
None of my other files take this long - except for the JSP's.

-Original Message-
From: Poon, Johnny [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 11:40 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


What is the CPU and Memory of your computer?  Sometime it could be
simply lack of power to run WSAD.

Another thing you can try is to turn off "Perform build automatically on
resource modification" and "Refresh Workspace on startup".  You can find
these 2 options in "Window->Preferences->Workbench".

HTH.

JP



-Original Message-
From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 10:33 AM
To: 'Struts Users Mailing List'
Subject: RE: JSP's taking too long in websphere


I'm sure there's an option to turn that off somewhere.  What version are
you running?

Websphere tends to be kinda slow.  I've had some issues with that,
especially in version 4 and version 5 integration edition.

- Keith


-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 11:18 AM
To: 'Struts Users Mailing List'
Subject: JSP's taking too long in websphere


Hello everyone,

I work with strtus framework and use websphere. The problem is that it
takes a lot of time to open, load, or save my JSP pages. Could it be
because websphere compiles everything (even when I open the page?) if
yes, is there any option to turn that off?

I appreciate any suggestion

Mona 




*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 


*


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



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


-
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 put a in a href=""

2003-06-05 Thread Varun Garg
Do this



-Original Message-
From: António Santos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: how to put a  in a href=""



Hi all,

Maybe this is a simple question, but I'm stuck with this:
How can I set a href in a  tag with a string concatenated
with a ? I mean, I want to do something like this:

">

Of course, this doesn't work.

I want href to have the string "getorg.do?id=" concatenated with the
output from 

I suppose this must be done with a scriptlet. By the way, the "orglist"
bean comes from a logic:iterate over a vector of Beans (named
"orglistview").

Anyone?

Thanks,

Antonio Santos


-
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: Advice with reading multiple html:selects

2003-06-04 Thread Varun Garg
It does not matter about building it dynamically, what matter is what
was selected when the form was submitted.

Only the selected values are transmitted back and they should all come
back in that array.



-Original Message-
From: netizen1 [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 4:16 PM
To: [EMAIL PROTECTED]
Subject: Advice with reading multiple html:selects


Hello,

  I have read the newsgroups regarding multiple selects.
  I have a multiple html:select control that starts out empty
  I populate the select control by using a textbox and an add button
  so it is filled dynamically.
  

  My html:select is:
  

  which comes out like :
  

  I have an action Form that has:

  private String[] gstrQuestionOptions= null;

  public String[] getQuestionOptions()
  {
 return this.gstrQuestionOptions;
  }
  public void setQuestionOptions( String[] value )
  {
 this.gstrQuestionOptions = value;
  }

  Even in the validate i try the following
  System.out.println( getQuestionOptions().length ) and i get
  java.lang.NullPointerException

  Since the select control is dynamically populated would i have to
  use something like request.getParameterValues("questionOptions")
  instead?


  Thank you
  

-- 
Best regards,
 netizen1  mailto:[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: Form submit without button or image?

2003-06-04 Thread Varun Garg
You can use javascript to do that.

"javascript:document.forms[0].submit();"


Just add this to a href if you are doing a link.



-Original Message-
From: Gregory F. March [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 2:23 PM
To: Struts Users Mailing List
Subject: Form submit without button or image?



I'm not sure if this is a struts question or not, but I have a
DynaActionForm and I'd like to add, for lack of a better term, a "submit
link".

I want a link that submits the form, but I don't want a button or an
image.  Can this be done?

Thanks,

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-
AIM:GfmNet

-
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: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
The only way I have done that is using straight java <%=%>.

You can definitely do that.

Also, the reason your <%= was not working was that the objects that you
were trying to reference were not declared on you page, but they are
stored in pageContext and cannot be accessed directly.

For using <%= you have define the objects in the scope they will be
used.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:45 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


If I decided to pass a dynamic value using javascript in struts tag
libs, it's not doable, right? regardless of using another taglib or not.

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 1:26 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I did not say it is impossible, the thing is that you are trying to use
tag inside tag and that is causing some problems, I am just suggesting a
quick solutions.

Also, when you start getting into custom javascript, you are not really
following struts at that point. 





-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:21 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Yes, thank you.
So, this means that it is impossible to do it with struts taglibs?

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 1:18 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I changes it to use  rather than  and removed the extra ".

You can use the property or not depending on your requirement.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:15 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


eliminating "property" doesn't do it!

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:35 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Try this, this should work.

'); document.forms[0].submit(); ">


   

-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:23 AM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
"javascript:setHiddenLetter('". So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to
that same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.



"'); document.forms[0].submit(); ">


   
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:




   

I would like to replace that 'D' with something like <%=choice%>, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()

function doInsert() {
 document.forms[0].submit();
}


  

  
   

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in 

RE: Storing the Output of a Servlet to Database

2003-06-04 Thread Varun Garg
The only way a servlet writes is when it uses a PrintWriter. So you have
complete control over what you are sending out.

If you are on the client side then you need to what type of client, if
it is a java client then you could use a URL object to create a
connection and then get the output.






-Original Message-
From: Rajesh P [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:24 AM
To: Struts Users Mailing List
Subject: RE: Storing the Output of a Servlet to Database


Hi,
I am aware of how to store the contents to the database. What i am
really interested is how to capture the output of the servlet. Forget
PDF, assume that the Servlet is just serving a normal html content.
After the servlet has given this to the response, how to capture this as
a byte stream is my real question. Thanks, Rajesh

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 7:44 PM
To: Struts Users Mailing List
Subject: RE: Storing the Output of a Servlet to Database



Ideally, you should store the document on file system, the better place
for PDF BUT you may some weird requirement Anyway, if you are adamant on
doing this.

--first way--

0. create a field in your database with blob data type. (I have MySQL)
but oracle/ mssql7 all have this data type. 1. generated pdf document
needs to converted into binary data. ( it is be default ;-) 2. write it
down to that field as normal query.

you may wish to see java.sql.Blob and java.sql.prepraedStatement.setBlob

--second way--
0. create a field in your database with varbinary type.
1. generated pdf document. read it as byte stream and get arrys of
bytes. 2. write it down to that field as normal query.

see java.sql.prepraedStatement.setBytes

HTH
navjot



|-Original Message-
|From: Rajesh P [mailto:[EMAIL PROTECTED]
|Sent: Tuesday, June 03, 2003 5:28 PM
|To: Struts Users Mailing List
|Subject: Storing the Output of a Servlet to Database
|
|
|Hello Everyone,
|I have a requirement wherein a Servlet class is used to generate a PDF 
|document. This output should be stored into a database table for future

|retrieval. Can somebody tell me how this output of the Servlet can be 
|captured and stored into a database table? Or rather, how to capture 
|the response outputstream, convert it to bytes so that it can be 
|persisted in the datbase. Please note that we are not allowed to write 
|to a File and then upload it. Thanks,
|Rajesh
|
|-
|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: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
I did not say it is impossible, the thing is that you are trying to use
tag inside tag and that is causing some problems, I am just suggesting a
quick solutions.

Also, when you start getting into custom javascript, you are not really
following struts at that point. 





-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:21 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Yes, thank you.
So, this means that it is impossible to do it with struts taglibs?

-Original Message-----
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 1:18 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I changes it to use  rather than  and removed the extra ".

You can use the property or not depending on your requirement.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:15 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


eliminating "property" doesn't do it!

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:35 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Try this, this should work.

'); document.forms[0].submit(); ">


   

-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:23 AM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
"javascript:setHiddenLetter('". So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to
that same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.



"'); document.forms[0].submit(); ">


   
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:




   

I would like to replace that 'D' with something like <%=choice%>, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()

function doInsert() {
 document.forms[0].submit();
}


  

  
   

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any acti

RE: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
I changes it to use  rather than  and removed the extra ".

You can use the property or not depending on your requirement.



-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 12:15 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


eliminating "property" doesn't do it!

-----Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:35 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Try this, this should work.

'); document.forms[0].submit(); ">


   

-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:23 AM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
"javascript:setHiddenLetter('". So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to
that same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.



"'); document.forms[0].submit(); ">


   
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:




   

I would like to replace that 'D' with something like <%=choice%>, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()

function doInsert() {
 document.forms[0].submit();
}


  

  
   

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



*
Th

RE: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
Try this, this should work.

'); document.forms[0].submit(); ">


   

-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 11:23 AM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


Varun,

I've tried to put that in, but it still doesn't work:

it cuts it when it comes to those double quotes, so, my href would be =
"javascript:setHiddenLetter('". So, it doesn't like those quotes.

I've tried removing them and putting them in single quotes, I'm back to
that same problem. It reads the whole thing as one string.

Please advice!

Mona

-Original Message-
From: Varun Garg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 03, 2003 12:06 PM
To: 'Struts Users Mailing List'
Subject: RE: taglibs - nonstatic javascript value


I would just put a bean:write instead on the D.



"'); document.forms[0].submit(); ">


   
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:




   

I would like to replace that 'D' with something like <%=choice%>, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()

function doInsert() {
 document.forms[0].submit();
}


  

  
   

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


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



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


-
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: taglibs - nonstatic javascript value

2003-06-04 Thread Varun Garg
I would just put a bean:write instead on the D.



"');
document.forms[0].submit(); ">


   
-Original Message-
From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:50 AM
To: 'Struts Users Mailing List'
Subject: taglibs - nonstatic javascript value




yes, it worked.

I have one problem, though: passing dynamic value to the function I call
in javascript.

This is what I have:




   

I would like to replace that 'D' with something like <%=choice%>, for
the user to be able to select the letter (there are letter A through Z,
and 'letter' is a hidden field).

How can I do that?

Mona 

-Original Message-
From: Lynn Guy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 4:35 PM
To: Struts Users Mailing List
Subject: RE: first time action


put them in an html form tag
then in your link do something like
onclick=this.submit()

function doInsert() {
 document.forms[0].submit();
}


  

  
   

I think the name property for the html:form tag is no
longer valid so forms[0] refers to the first form on
my page.

In your case you can probably use the html:link tag
and put the javascript call in the onclick property.

hth



*
The information in this email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
email by anyone else is unauthorized. 

If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on
it, is prohibited and may be unlawful. When addressed to our clients any
opinions or advice contained in this email are subject to the terms and
conditions expressed in
the governing KPMG client engagement letter. 

*


-
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 prevent access to pdf files

2003-06-04 Thread Varun Garg
The way I have handled the problem in the past is to create a servlet
streaming out the pdf and then I have complete control over
authorizations. I would set the mime types to the pdf and then browser
will treat it properly.



-Original Message-
From: John Brayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Re: How to prevent access to pdf files


>I am on a page. There are a list of pdf files on the page. If a user 
>clicks on a pdf file, I want him to be redirected to a login page if he

>is not logged in. However this doesnt seem to be happening even with 
>filters. Does the click on a pdf file not recognized as a request?

Verify that the PDF is part of the webapp, and is being served by 
Tomcat.  Also verify that the "web.xml" file specifies that the 
filter should be processing requests for the ".pdf" suffix.  Often 
filters are configured to only process requests routed to servlets or 
JSP's.

John

-
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: out-of-memory exp

2003-06-04 Thread Varun Garg
This comes when weblogic runs out of memory. 
 
If this happens often, then I would look at the code and check for any
bad looping thats going on.
 

-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 03, 2003 9:15 AM
To: [EMAIL PROTECTED]
Subject: out-of-memory exp



hi,
i am using struts 1.1 with ejb on weblogic7.1
 
i  frequently get this error while working with the web application
 
   <101017>
<[ServletContext(id=4550717,name=cwbweb,context-path=/cwbweb)] Root
cause of ServletException
java.lang.OutOfMemoryError
<>
no idea why this comes
 
any help TIA
 
--nagi
 
Nagendra Kumar O V S
Member Technical Staff
Ikigo India Private Ltd.
470-B, Road No. 36,
Jubilee Hills,
Hyderabad 500033
Contact(O): 23544671
Cell: 98482-41789



    IncrediMail -
Email has finally evolved -
 Click Here