Can any one do this?

2002-05-06 Thread Yaman Kumar

Hi,
Can any one help me out in defining string variables and 
assigning the values to them  using Jakarta string or bean taglibs.
Or I would be glad if below code converted into tag format 
using string,session,bean(jakarta  taglibs).



<%
String var1=null;
String var2="";
String var3;
MyBean mbean = (MyBean) session.getAttribute("MYBEAN");
if(mbean!=null){
var1= mbean.getVariable1();
var2= mbean.getVariable2();
}else{
YourBean ybean=(YourBean) session.getAttribute("YOURBEAN");
   var1= ybean.getYourValue1();
var2= ybean.getYourValue2();
}
%>
 Value1is <%=var1%> 




Many Thanks,
RYK

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Seeking help

2002-05-06 Thread Yaman Kumar

Hi,
Though this is not related to struts but I'm having little difficulty
in accessing jsp pages that are in web-inf\jsps\ directory.

When I accessed (using http://localhsot:8080/myapp/x1.jsp)
x1.jsp which is in web-inf\jsps\ Tomcat4.0 is giving
404 error. Does Tomcat expect .jsp files  in  webapps\myapp\ directory?

If I want to maintain jsp files in webapps\myapp\web-inf\jsps directory
How should I access these .jsp files from browser even after trying by
accessing http://localhost:8080/myapp/jsps/x1.jsp, Does any extra jsp
configuration
setup required?

Please let me know? As i read the Tomcat4 doesn't serve any file
which is in web-inf directory unless it is from another page or request.

Many Than,
RYK


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Interesting question?

2002-05-15 Thread Yaman Kumar

Hi,
I have a problem in rendering data from an object that is
bound to request object in myaction class.
  request.setAttribute("myVector",results);
and that is fetched and put it in html select component in myJSP.





  
So far this is fine..
When I'm validating the form that is in myJSP.jsp
and if it finds any errors the same page(myJSP.jsp) is supplied back to
user,
but i am not able to see the data in select box again,

How could i get the data that is in myVector instance as it is bound to
request.
or How could i retain the data in select box.

I can't bind myVector object to session scope.
Can any one help me out in this?

Many Thanks,
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: class cast exception

2002-05-15 Thread Yaman Kumar

Hi,
Can You check action element attributes in action-mappings element in
struts-config.xml element.
Ex: some thing like below



 




 



hope it helps
rayaku

-Original Message-
From: Thorsten Maus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 May 2002 6:40 PM
To: struts-user
Subject: class cast exception



hi there ...

i always get a class cast excpetion when trying to cast the form-class
is there anybody who is able to tell me what is wrong in my form-class 

public class StrutsAction extends Action{

public StrutsAction() {
}

public ActionForward perform(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
   throws IOException, ServletException
{

MyActionForm myActionForm = (MyActionForm) form;

//myActionForm.setParam1("_new value");

return mapping.findForward("forward");
}

}

public class MyActionForm extends ActionForm {

private String param1;

public String getParam1(){
return param1;
}

public void setParam1(String param){
this.param1=param;
}

}

thanks in advance

thorsten


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Applying struts submit and reset button tags functionality to images

2002-05-15 Thread Yaman Kumar

Hi,
Can any one help in applying struts submit /reset buttons
to images.

submit

reset

To

/images/submit.gif" width="42"
height="22" border="0">

/images/reset.gif" width="42"
height="22" border="0">

Many Thanks,
rayaku




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help : Dropdown List

2002-05-15 Thread Yaman Kumar

Hi,
There is little advice If I understood ur problem.

Do u have your "list" object in request scope with the key "complist".
and if u would like to populate the complist in list box then
change the statment to below one.If u r looking for option values and option
names are same.



I hope this helps you

Bye
rayaku

-Original Message-
From: Damien VIEL [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 15 May 2002 6:52 PM
To: Struts Users Mailing List
Subject: Re: Help : Dropdown List


Hi...

I do not manage to do what I want :)
I explain my problem.

I've got 3 classes and 1 jsp:
- AddProjectForm.java
- AddProjectAction.java
- CompanyJob.java
- project.jsp

In my CompanyJob.java I've got this following methode  :

public ArrayList getAll() throws SQLException {
  ArrayList list = null;
  Connection c = null;
  c = pool.getConnection();
  Statement stm = c.createStatement();
  MyRequest sqlrequest = new MyRequest();
  ResultSet rs = stm.executeQuery(sqlrequest.sqlGetAllCompany());
  while (rs.next()) {
  list.add(new String (rs.getString("comp_name")));
  }
  return list;
 }

I want to populate the dropdown List in my JSP with the ArrayList and in
don't
manage to do it Following the JSP :

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





  


  





  


  

  





Help... Where is the problem

Thanks All
Dams


- Original Message -
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 14, 2002 7:46 PM
Subject: RE: Help : Dropdown List


> sorry I did not clarify.
>
> I was not advocating to do this in the jsp.
> This should be done within the action.
>
> I guess I take this for granted.hmmm.
>
> JM
>
> > -Original Message-
> > From: Damien VIEL [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, May 14, 2002 1:39 PM
> > To: Struts Users Mailing List
> > Subject: Re: Help : Dropdown List
> >
> >
> > Ok,
> > no problem with this example.
> > But I've read that it's not a good choice to create the ArrayList
> > in the JSP
> > but create it
> > in another class and put this Arraylist in the request object. So
> > you set a
> > bean in the JSP.
> >
> > <%jsp:UseBean.../%>
> > 
> >   
> >  >labelProperty="label"/>
> >   
> > 
> >
> > My problem is that I do not know where and when I must add the
> > ArrayList to
> > the request object ?
> >
> > Dams
> >
> >
> > - Original Message -
> > From: "James Mitchell" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, May 14, 2002 7:20 PM
> > Subject: RE: Help : Dropdown List
> >
> >
> > > Well, if you look at the subscription.jsp.
> > >
> > >
> > > The example loads these in the jsp, but this could easily have
> > been a call
> > > to your data manager/service or could even been pre-cached as an
> > application
> > > scope list.
> > >
> > >
> > >
> > > <%-- In real life, these would be loaded from a database --%>
> > > <%
> > >   java.util.ArrayList list = new java.util.ArrayList();
> > >   list.add(new org.apache.struts.util.LabelValueBean("IMAP Protocol",
> > > "imap"));
> > >   list.add(new org.apache.struts.util.LabelValueBean("POP3 Protocol",
> > > "pop3"));
> > >   pageContext.setAttribute("serverTypes", list);
> > > %>
> > >
> > >
> > >
> > > 
> > >   
> > >  > >labelProperty="label"/>
> > >   
> > > 
> > >
> > >
> > > JM
> > >
> > > > -Original Message-
> > > > From: Damien VIEL [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, May 14, 2002 1:11 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Help : Dropdown List
> > > >
> > > >
> > > > Sorry no,
> > > > but I'm going to :)
> > > > Dams
> > > > - Original Message -
> > > > From: "James Mitchell" <[EMAIL PROTECTED]>
> > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > > > Sent: Tuesday, May 14, 2002 6:59 PM
> > > > Subject: RE: Help : Dropdown List
> > > >
> > > >
> > > > > Did you get the struts-example running???
> > > > >
> > > > >
> > > > > JM
> > > > >
> > > > > > -Original Message-
> > > > > > From: Damien VIEL [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Tuesday, May 14, 2002 12:54 PM
> > > > > > To: Struts Users Mailing List
> > > > > > Subject: Help : Dropdown List
> > > > > >
> > > > > >
> > > > > > Hi :)
> > > > > >
> > > > > > Could anyone pls tell me how to populate a dropdown list using
> > struts
> > > > > >  tag libraries. I've heard that I need to put a Collection
> > (Arraylist)
> > > > in
> > > > > > the request.
> > > > > > This Collection is build from a Database.
> > > > > > For Example I have 3 files :
> > > > > > - UserForm.java
> > > > > > - UserAction.java
> > > > > > - SelectUser.jsp
> > > > > >
> > > > > > I want to select a user from the dropdown list that appears in
my
> > > > > > Se

Most interesting question.

2002-05-15 Thread Yaman Kumar

Hi,
I have a problem in rendering data from an object that is
bound to request object in myaction class.
  request.setAttribute("myVector",results);
and that is fetched and put it in html select component in myJSP.





  
So far this is fine..
When I'm validating the form that is in myJSP.jsp
and if it finds any errors the same page(myJSP.jsp) is supplied back to
user,
but i am not able to see the data in select box again,

How could i get the data that is in myVector instance as it is bound to
request.
or How could i retain the data in select box.

I can't bind myVector object to session scope.
Can any one help me out in this?

Many Thanks,
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Templates and i18n problem in struts

2002-05-16 Thread Yaman Kumar

Hi,
I am using templates in struts, In my jsp page I used the below
statement.
..

..

the  statments prints MYPRINTPAGE .
but the output is not rendered in title location in runtime,
but it is printing  message without
parsing the tag..

In short how can i use  tag in templates.

Could any one extend your hand...

Many Thanks,
rayaku



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Templates and i18n problem in struts

2002-05-16 Thread Yaman Kumar

Hi,
I am using templates in struts, In my jsp page I used the below
statement.
..

..

the  statment prints MYPRINTPAGE .
but the output is not rendered in title location in runtime,
but it is printing "" message without
parsing the tag..

In short how can I use  tag in templates.

Just  review the code to find out problem below.

in MyTemplate.jsp

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


 //this is not parsed.



//This is parsed



in MyClient.jsp

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


  
//this bean tag is not parsed and not input the value to MyTemplate.jsp



Many Thanx,
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using datetime jakarta-tag in Struts

2002-05-17 Thread Yaman Kumar

Hi, Can any one help me in printing below String using dateformat tag
always it is giving "Invalid date ".

CODE in MVC

java.text.DateFormat dformat = java.text.DateFormat.getDateTimeInstance();

<%=myinfo.getUpdatedDate()%> ==>  2002-04-02 11:31:48.0

<%= dformat.format(myinfo.getUpdatedDate()) %> > 2/04/2002 11:31:48


By using jakarta taglib (datetime.tld)

 <%=mybean.getLastUpdated() %> 
==>Invalid Date


Can any one help in converting above code using jakarta datetime taglib?


Many Thanks,
rayaku



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Accessing ApplicationResources.properties file in action class

2002-05-20 Thread Yaman Kumar

Hi,
I have a requirement of accessing properties(i18n) file in action class.
Can any one throw light on it?.

Many Thanks,
rayaku

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




A TagLib question

2002-05-23 Thread Yaman Kumar

Hi,
I'm newbee to JSP taglibraries, I'm having some doubts
in creating a tag library declared below.



In TagHandler java flile I have got all these into methods, But
how would I invoke getFullName() method on student instance
some thing like  
student.getFullName(); in TagHandler class.
As  this information in getter/setter methods is in String format.

I tried like this and I'm not able to go ahead.

objName = pageContext.getAttribute(getName());
nameType= objName.getClass().getType();
objType = getType(); //tag handler method
if(nameType.equals(objType) ){

   //here i would like to call 
 
}

TIA
Rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using hidden variable without form

2002-06-03 Thread Yaman Kumar

Hi,
I have a jsp file without a form and has got one image and target of this is
one action class which requires 2 parameters, When i click on this button
i do not want  these parameternames and values to appear in
  querystring in browser address location,
Can i avoid these showing in querystring?, like
.


or any other way to avoid to show these parameters.

TIA
rayaku




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




several jsps using 1 action class and avoiding several action statements in struts-config.xml

2002-06-03 Thread Yaman Kumar

Hi,

I have 4 jsp files using one action class and action class forwards to
the page which called this action class.Becoz i would like user
to go back to same page from which he visited.

Can i  avoid writing 4 action mappings and all 4 mappings have only same
action
class but  forward value is different to each.

First.jsp calls /first.do

  


Second.jsp calls /second.do

  


Third.jsp calls /third.do

  


Fourth.jsp calls /fourth.do

  


In all above action mappings the action class is same but only path and
success
pages are different, Is there any technique to change these paths and
forward paths
dynamically.

TIA
Yaman


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using formbean effectively.

2002-06-03 Thread Yaman Kumar

Hi,

I have an frist.java (action class) and that would keep so much info
in several attributes and bound them to request object, and then in
first.jsp page i would
retrieve all of them and display in FristForm.java controls.

I have got an idea to keep all the information in FirstForm bean itself in
First.java
rather than binding to request in action class and showing it in FirstForm
in First.jsp.

If any one of you feel this idea is good enough, then how could i put them
in form bean
( which has got select,radio buttons) and pass this formbean to First.jsp
page to display.

Can any one suggest me how to do it and how an action mapping should be
coded.

TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using formbean effectively(again)

2002-06-03 Thread Yaman Kumar

Hi,

I have an frist.java (action class) and that would keep so much info
in several attributes and bound them to request object, and then in
first.jsp page i would
retrieve all of them and display in FristForm.java controls.

I have got an idea to keep all the information in FirstForm bean itself in
First.java
rather than binding to request in action class and showing it in FirstForm
in First.jsp.

If any one of you feel this idea is good enough, then how could i put them
in form bean
( which has got select,radio buttons) and pass this formbean to First.jsp
page to display.

Can any one suggest me how to do it and how an action mapping should be
coded.

TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




HttpSession problem in struts

2002-06-05 Thread Yaman Kumar

Hi,
I am implementing struts to my new web application, and have
problem with new window that is opened by parent window using javascript is
treated in new session.

After logging in to application successfully so much info is loaded into
session object and user gets a second page and this page opens
a new window(child) where a new page will be loaded and
trying to read some info from session but the session becoming new so i'm
not able to get my info that is loaded in session.

Can any one give suggestion and why it is treating it in new session
rather in parent window session.

Thanks,
Yaman



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Design question

2002-06-05 Thread Yaman Kumar

Hi,
I have a design question of struts implementation in my application,

I have a AformBean in A.jsp and the page action is actionA, actionA
processed
all AfromBean values and got some dynamic data from Database,Now i
would like to keep this data in BFormBean and the actionA forwards the
output to B.jsp  how to keep the data in BformBean and how to populate them
in B.jsp?.

As when I requested form in actionA it is giving AformBean so i processed
all values them and got dynamic data and now
i would like to keep data in BFormBean, but i can't get
the reference of it. So how can i achieve?.

Can any one help me out?
TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




dynamic form properties

2002-06-06 Thread Yaman Kumar

Hi,
I have a requirement to create (n number of)radio buttons
dynamically.I would like to validate them at form, How would i do this
as these are dynamic properties?.

Like Administrator has got 3 options to choose against each student name,

ex. in MVC it looks like
<% for (int i=0;i
  Name : <%certCode[i]%>

   
value="Y" >

   
value="X" >

   
value="Z" >

<%}//for ends %>


TIA
yaman

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Dynamic FormBean properties to display dyanamic controls

2002-06-06 Thread Yaman Kumar

Hi Tim,
I could not get, can u elaborate it?
As i found this thread in struts-archive, I have
a problem similar to this one.
I would like to display 3 radio buttons per row(student info) grouped as
one.
and like that it would display no of rows(students). So As there
are not dynamic properties for each row in my FormBean
I am not able to get them at FormBean to validate,

I believe your response could help me more to investigate it.

TIA,
yaman





From: Pedone, Tim [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 5:03 PM
To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
Subject: RE: PLEASE HELP !!!


If you have control over the html that is rendered then you can use the
property="property(name)" technique.  Just add

void setProperty(String key, String value)
String getProperty(String key)

to your ActionForm and have them store the values in an underlying HashMap.
You can generate "name" above dynamically in your html form and Struts will
call setProperty(name, value) for you.

Tim


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Is Struts architecture a disadvantage?

2002-06-06 Thread Yaman Kumar

MessageHi,
I have a question regarding struts architecture, As the Html form and its
validation has been moved and
implemented at server side ( a ActionForm ), once any validation error
encounters that  is shown
in the same page from which this request is generated ( this is very
impressing), but the page
can't retain its old information other than form information.

Case:
An action class bound data into request scope with 3 different attribute
names and forwarding to x.jsp which has
got a form (XFORM) too. In x.jsp it received 3 different attributes and
shown data in tabular format , when
user submits this form to different action this form bean will be validated
and if any errors encountered x.jsp
page would be shown back to user, at this time user can't see the data that
is shown tabular format.
As request is new it can't hold the previous state, this compels the struts
users to keep this data(3 attributes)in session scope so when user comes
back he could see the error with the data too. In a big web application if
we keep data
in session scope the server/application become heavily loaded.

Don't you think this is disadvantage of keeping /validating the formbean at
server side. But I'm sure there are more and more advantages over this
disadvantage.

Please let me know if any better way to solve above problem and forgive me
to  understand this as a disadvantage
of struts architecture.

Thanks
yaman



Enabling Struts submit and reset functionality to html images...

2002-06-08 Thread Yaman Kumar

Hi,

What is way to enable submit and reset functionality to images.
I have written in this way but it is not working out..

For submit (working fine)


For  reset ( submitting but not resetting the form ? ).




Does any one have better approach?

TIA
rayaku

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: i18n and images?

2002-06-10 Thread Yaman Kumar

Hi,
If I understand your question properly, keep all images of application in a
dir
and write these images names in properties file(i18n_*.properties)
with key names and in jsp page call that key name.

Example.
suppose you need to display an image (x1.gif) for en locale
and other image(x2.gif) for fr locale.
then in your properties file Application resources or I18N props file)
In *_en.properties maintain a key sampleImage = x1.gif,
In *_fr.properties maintain a key sampleImage = x2.gif.

and in your jsp call 
to render it in page.

HTH
TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Not a trivial, but got very much meaning

2002-06-10 Thread Yaman Kumar

Hi,
Can any one help me out in enabling reset and submit functionality
to image buttons? Many people suggested me to follow struts-example
but i did not find any there.

TIA
yaman

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Not a trivial, but got very much meaning

2002-06-10 Thread Yaman Kumar

Hi Vikram,
Thanks a lot, but there is no result because document.form.reset() is
submiting
the page.

TIA,
rayaku


-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Monday, 10 June 2002 7:47 PM
To: Struts Users Mailing List
Subject: RE: Not a trivial, but got very much meaning


Not sure what you want to do but if you want your submit image to submit,
then onclick, just do a document.form.submit(), similarly for reset


Rgs
V
-Original Message-
From: Yaman Kumar [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 7:32 PM
To: Struts Users Mailing List
Subject: Not a trivial, but got very much meaning


Hi,
Can any one help me out in enabling reset and submit functionality
to image buttons? Many people suggested me to follow struts-example
but i did not find any there.

TIA
yaman

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


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


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




RE: Not a trivial, but got very much meaning

2002-06-10 Thread Yaman Kumar

Hi,
The reset is not working and It is submitting the page by default,
I have the submit image button to submit page for which i have used
 ( this is submiting fine)
But the below is not working.( the below code is submitting the page)


  



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Help needed.

2002-06-10 Thread Yaman Kumar

Hi,

I have a jsp page named x.jsp with several href links and one of them
refers to myaction.do which expects a formbean and its validation is false
and that forwards to mypage.jsp.

and mypage.jsp has got same form bean and its action is again myaction.do
but this time i would like to validate the formbean, Is it possible to
do ? my struts-config.xml looks like this.



The above code is used by x.jsp and i have requirement to use same action
by mypage.jsp but this time form should be validated.

As i can't give another action with different path and same type and
validate="true".

In short can I validate the form bean in above action when it is
used by mypage.jsp. or can i change this validate value dynamically.

thanks,
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help needed.

2002-06-10 Thread Yaman Kumar

Hi Sri,
It was implemented as you suggested but i have preferred action paths.
Just i wanted to know is there a way to change the validate value
dynamically to true/false
without creating a new one which refers to same action class.


Thanks
rayaku
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 11 June 2002 12:57 AM
To: 'Struts Users Mailing List'
Subject: RE: Help needed.


Just add another action mapping like:





The 'type' attribute's value will result in the same action being
executed -- this time *with* validation.

HTH

Sri

-Original Message-
From: Yaman Kumar [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 10, 2002 2:21 PM
To: Struts Users Mailing List
Subject: Help needed.


Hi,

I have a jsp page named x.jsp with several href links and one of them
refers to myaction.do which expects a formbean and its validation is false
and that forwards to mypage.jsp.

and mypage.jsp has got same form bean and its action is again myaction.do
but this time i would like to validate the formbean, Is it possible to
do ? my struts-config.xml looks like this.



The above code is used by x.jsp and i have requirement to use same action
by mypage.jsp but this time form should be validated.

As i can't give another action with different path and same type and
validate="true".

In short can I validate the form bean in above action when it is
used by mypage.jsp. or can i change this validate value dynamically.

thanks,
rayaku


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

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


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




Using Hashtable to show html options using struts html:options tag

2002-06-10 Thread Yaman Kumar

Hi,
Can any one suggest me in using Hashtable in html:options tag
to render html options.
I could render with vector but not with Hashtable(key & value are Strings).

TIA
rayaku

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Two questions

2002-06-12 Thread Yaman Kumar

Hi,
I have 2 questions
1.Regarding calling a method that is in ActionForm from a jsp.
  Ex:   I have an image and i would like to enable reset method to image that
is in MyActionForm class.

2. I have a forward that is in global-forwards and i would like to get that
in a
jsp page,
Ex.




Can I call  "sessionexpired" forward name in a jsp file rather than writing
InvalidSession.jsp?, So that if i change path of this forward in future that
should
affect in whole web application.

TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Two questions

2002-06-13 Thread Yaman Kumar

Hi Niall,
Thank you very much,
My first question is  Enabling calling) the reset method to an image that is
in jsp. "javascript:document.this.reset() " is called on image but not
working.
and I tried with several options by replacing "this" with form and myForm,
But
none of them are successful..

In short how can we enable submit and reset button functionality to
images?.

TIA
rayaku






-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 June 2002 7:44 AM
To: Struts Users Mailing List
Subject: RE: Two questions


I didn't understand the first question.

You can forward in a jsp using the struts forward tag:

  

Niall

> -Original Message-
> From: Yaman Kumar [mailto:[EMAIL PROTECTED]]
> Sent: 12 March 2002 23:04
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Two questions
>
>
> Hi,
> I have 2 questions
> 1.Regarding calling a method that is in ActionForm from a jsp.
>   Ex: I have an image and i would like to enable reset method to
> image that
> is in MyActionForm class.
>
> 2. I have a forward that is in global-forwards and i would like
> to get that
> in a
> jsp page,
> Ex.
> 
>   
> 
>
> Can I call  "sessionexpired" forward name in a jsp file rather
> than writing
> InvalidSession.jsp?, So that if i change path of this forward in
> future that
> should
> affect in whole web application.
>
> TIA
> rayaku
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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


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




Need Urgent help

2002-06-13 Thread Yaman Kumar

Hi,
I have a problem in using logic:equal tag given below

 DO SOME.

This code is working fine when it is not null. But when ever it {
beaninstance.getMethod() }
is becoming null, page is getting exception as below...

javax.servlet.jsp.JspException: Cannot compare null variable to value A
at org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193)
at org.apache.jsp.HNCTemplate$jsp._jspService(HNCTemplate$jsp.java:317)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)

Can any one help me out in this, I tried to break this in logic:equal source
file..

TIA
rayaku


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




help needed - default selection in dynamic select boxes.

2002-06-14 Thread Yaman Kumar

Hi,
I am using struts v1.0.2 and heard this does not support generation of
dynamic html controls through struts tags().

I have a collection of ComboBoxBeans with name-value pair in a Vector to
show
html options  and would like to use it with 2nd collection .
I have a problem in rendering default selection in select boxes that are
rendered by 2nd collection.
( In mvc lt looks like this ).

<%for(int k=0;(vectStudents!=null && k



<% LinkedList studentTypes = myBean.getAllTypes();
   String strSelected = "";
   for(int I=0;i
  value="<%= code %>"> <%= description %>


<%   }%>

<%}%>


Can I get the above code in struts implemented ? is it possible with 1.0.2?"
Is there any nested tag information available .
TIA
rayaku

-Original Message-
From: SATISH.T [mailto:[EMAIL PROTECTED]]
Sent: Friday, 14 June 2002 2:36 PM
To: 'Struts Users Mailing List'
Subject: RE: select dropdown with a nested name-attribute doesnt work in
any browser - sends wrong value in request


Hi I have tried out nested:select in both IE and netscape and it works
fine. The property bandList is the one I set in my nested beans which is
a collection (Arraylist ) of label Value beans(name-value pairs).
This is the syntax I use and the values are returned properly.

 " >

 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 2:21 PM
To: Struts Users Mailing List
Subject: select dropdown with a nested name-attribute doesnt work in any
browser - sends wrong value in request

Neither Mozilla nor IE are handling my HTML produced from nested tags.
They ignore any selection I make in a select dropdown when I submit. The
incoming parameters at the server show that the original value is always
sent.

My HTML:


-- please select --
Strange Location
Up a tree
Kebabhouse


In my debug logging, I see all the other parameters with correct values,
but I get operation[0].locationIdString=0 no matter what I select.

Is anybody successfully using nested dropdowns / select boxes? Why does
this affect both browsers? Am I going mad?

Adam

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Preselected option in dropdown

2002-06-14 Thread Yaman Kumar

If your select box property is existing in your Action Form bean
and its value matches with any of its option values , struts would
select that item by default.

ex:




and if u have method with name getMyname() ( set method also )in your action
form
and if getMyname() returns a value(X) and if collection(mynames) has X in it
then
X would be selected by default, but user could c only labelproperty of X.

If you are looking for dynamic control generation and dynamic selection for
each row
then  struts 1.0.2 do not support.

HTH
yaman

-Original Message-
From: Vijay Kumar [mailto:[EMAIL PROTECTED]]
Sent: Friday, 14 June 2002 7:10 PM
To: [EMAIL PROTECTED]
Subject: Preselected option in dropdown


Hi,
   Is there any way to show preselected option in dropdown. Its like my
search returns arraylist and i need to show show particular value in drop
down.
  Thanks in advance

Cheers
vkvk





_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: JSP's under WEB-INF?

2002-06-14 Thread Yaman Kumar



-Original Message-
From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 June 2002 5:01 AM
To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
Subject: RE: JSP's under WEB-INF?


In looking at the Struts doc, is there any reason why the following wouldn't
work just as well?

in the JSP



in struts-config





I've tried it this was, and when I look at the generted HTML, the link looks
OK - but I still get the 404 error. Any idea why?

Jerry

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 6:30 PM
To: Struts Users Mailing List
Subject: RE: JSP's under WEB-INF?


That's because you are not following the recommendation 100%

You should always go through an action.
even if next.jsp is a simple form..use "/next.do" instead

that way you can put this in your struts-config:






James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org
ICQ: 27651409
AOLIM: jmitchtx (and NO I don't use AOL;)


> -Original Message-
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 06, 2002 7:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: JSP's under WEB-INF?
>
>
> Hi All,
>
> I'm trying to following some of the 'best practices' that I've
> seen on this
> mailing list, in particular the recommendation to put JSP's in a directory
> under WEB-INF.  I've got a test application where the INDEX.JSP is outside
> of WEB-INF, but all of my other JSP's are in a directory called
> 'test' that
> is under WEB-INF.  When I try to link to one of these pages (using
> , for example),  I get '404' errors saying the
> page cannot be found.  I know it's there, 'cause I can see it.
> How do I do
> this? Is there something in Tomcat that I am totally missing?
>
> Thanks!
>
> Jerry
> [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 (800)388-4675.
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:

For additional commands, e-mail:



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 (800)388-4675.



--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Urgent-using global-forwards in custom tag classes

2002-06-14 Thread Yaman Kumar

Hi,
I have a requirement to get a forward class in a Custom tag class which is
in
struts-config.xml.

I'm writing a user's session checking tag which needs to forward to a
login.jsp page
that is available in struts-config.xml





In my custom tag i would like to get the value of sessionexpired.
I'm following struts-example webapp to break this and looking
 tag
to extend it

TIA
rayaku




-Original Message-
From: William W [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 13 June 2002 8:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Validator and DispatchAction



Is it possible ?
Use boolean in the "depends" property ?


  
  
 methodName
 update
  



>From: "William W" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Validator and DispatchAction
>Date: Thu, 13 Jun 2002 14:46:09 +
>
>
>I think that if I use DispatchAction with ValidatorActionForm I will have
>the same problem. How can I validate the form for diferents methods in the
>same Action ? Am I wrong ?
>Thanks,
>William.
>
>
>>From: David Winterfeldt <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: Struts Users Mailing List <[EMAIL PROTECTED]>,  Rick
>>Reumann <[EMAIL PROTECTED]>
>>Subject: Re: Validator and DispatchAction
>>Date: Wed, 12 Jun 2002 14:42:51 -0700 (PDT)
>>
>>You would currently have to write your own required
>>validation method and have it check a variable defined
>>by a field to see if it should perform the validation
>>or not.  Or define a separate set of validation rules
>>for each action and use ValidatorActionForm (which
>>uses the action path to retrieve the validation
>>rules).
>>
>>David
>>
>>--- Rick Reumann <[EMAIL PROTECTED]> wrote:
>> > On Wednesday, June 12, 2002, 10:14:09 AM, William
>> > wrote:
>> >
>> > WW> I have a UserForm, the fields are : userId and
>> > userName.
>> > WW> I have a UserAction that extends DispatchAction.
>> > The UserAction have  two
>> > WW> methods (insert and update). For the insert
>> > method only the userName is
>> > WW> required, and for update method the userId and
>> > the userName are required.
>> > WW> How can I can do a dependency validation with
>> > the validator.xml ?
>> >
>> > I'm curious about this as well. There was a post
>> > a few days back
>> > dealing with the same issue. I think you are
>> > able to nest
>> > validation rules for a form but I forgot the
>> > exact syntax. Maybe
>> > someone else could shed some light again on how
>> > to do this.
>> >
>> >
>> > --
>> >
>> > Rick
>> > mailto:[EMAIL PROTECTED]
>> >
>> > "If you go to a party, and you want to be the
>> > popular one at the
>> > party, do this: Wait until no one is looking, then
>> > kick a burning log
>> > out of the fireplace onto the carpet. Then jump on
>> > top of it with your
>> > body and yell, "Log o' fire! Log o' fire!" I've
>> > never done this, but I
>> > think it'd work."
>> >   -Jack Handey
>> >
>> >
>> > --
>> > To unsubscribe, e-mail:
>> > 
>> > For additional commands, e-mail:
>> > 
>> >
>>
>>
>>__
>>Do You Yahoo!?
>>LAUNCH - Your Yahoo! Music Experience
>>http://launch.yahoo.com
>>
>>--
>>To unsubscribe, e-mail:
>>
>>For additional commands, e-mail:
>>
>
>
>
>
>_
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>




_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Extending logic:forward tag

2002-06-14 Thread Yaman Kumar

Hi,
I have a problem in extending logic:forward tag, Actually
I am developing a tag to check the user login status and can forward the
user
to my require page that is available in forward from global-forwards in
struts-config.xml.
After checking the struts-example web application "login.jsp" is literally
written checkLogon
tag, so I tried to read forward information dynamically from
struts-config.xml through ActionForwards, this job is already done in
login:forward tag, so I tried to extend logic:forward class, but I'm not
able to make use of it, so I just copied the code from logic:forward to my
tag
class(working fine). What all to be considered while extending struts taglib
classes..

TIA
rayaku




--
To unsubscribe, e-mail:   
For additional commands, e-mail: