request Processor in struts.

2005-02-08 Thread Sandip Khetle
Hi 
   Where do we make the entry for the request processor in
struts application?for example I have extended the RequestProcessor
class to create my
MyRequestProcessor ...How do I communicate this to the
application.Will i have to make any entry in some config
file...?

Thanks in advance

-- 
Regards,
SandipK

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



Redirect instead of forward in action mapping

2005-02-08 Thread Neil Aggarwal
Hello:

When I set up a form in struts, I am using this action
mapping:


  


When the form is posted successfully, the user is forwarded
to a page that says their information was entered successfully.

Unfortunately, if they hit reload on that page, it will re-execute
the form and their data will be posted again.

To get around this, I use a redirect instead of forward in many
of my apps.

Is there a way to do that within struts?

Thanks,
Neil


--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


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



RE: Struts validator [ client side error when using date validator]

2005-02-08 Thread Amjad I. Shahrour
Already tried, but still not working !

Amjad



-Original Message-
From: Saul Qunming Yuan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 08, 2005 7:35 PM
To: Struts Users Mailing List
Subject: Re: Struts validator [ client side error when using date
validator]

Off the top of my head, try using: datePatternStrict instead of
datePattern in  in your validation.xml.

Saul


> Hi,
>
> I have configured and used struts validator for my application,
> Server side validation is working perfectly...
>
>  For client side, the required  validator is working fine, but the
date
> ( for example) is not working and giving a java script error "
> datePattern" has no properties.
>
>
>
> Please help.
>
>
> Thanx in advance
> Amjad
>
>
> --Snippet from validation.xml-
>property="startDate"
>   depends="date">
>   
>   
>   datePattern
>   dd/MM/
>
> 
>
>
> --- Snippet from validation-rules.xml -- - --- ---
> classname="org.apache.struts.validator.FieldChecks"
>method="validateDate"
>  methodParams="java.lang.Object,
>org.apache.commons.validator.ValidatorAction,
>org.apache.commons.validator.Field,
>org.apache.struts.action.ActionErrors,
>javax.servlet.http.HttpServletRequest"
>   depends=""
>   msg="errors.date"
>jsFunctionName="DateValidations">
>
>  
>  
>
>   
>
>
> -
> 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: LazyDynaBean question

2005-02-08 Thread Joe Hertz
How about a simpler case then

My real goal is to have DynaForms that are backed my experimental
"semi-lazy-dynabean". 

BeanValidatorForm (while an impressive piece of work IMHO) isn't actually
subclass of a DynaForm (even though it seems like it can be used in almost
the same way). 

The way I see it, the "easiest" way is to implement a FormBeanConfig that
identifies my DynaBean and have all my beans use it? (I can get it to
default by mucking with the ModuleConfig object, right?)

Sorry for asking so many questions on this. I am delving into the innards of
Struts on a level I haven't before, and I think I'm *this* close to fixing
the thing about Struts that I seem to whine about incessantly.

If I have a DynaForm Object backed with my own brand of DynaBean, I'm most
of the way home.

Tx again


> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 07, 2005 1:01 PM
> To: Struts Users Mailing List
> Subject: Re: LazyDynaBean question
> 
> If you wanted to have Struts use different flavours of 
> BeanValidatorForm to wrap objects then you would have to 
> create your own custom FormBeanConfig implementation and 
> override the createActionForm() method. Then you need to 
> configure struts to use the custom FormBeanConfig and put in 
> place a mechanism to tell your custom FormBeanConfig how to 
> select the various flavours.
> 
> IMO a much simpler soution is to create your own custom 
> ActionForm by extending BeanValidatorForm (like 
> LazyValidatorForm in 1.2.6)
> 
> public class PathBeanValidatorForm extends BeanValidatorForm {
> public LazyValidatorForm() {
> super(new LazyDynaBean());
> setPathValidation(true);
> }
> }
> 
> ... and then cofigure it in the usual way.
> 
>type="myPackage.PathBeanValidatorForm "/>
> 
> Niall
> 
> - Original Message -
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> Sent: Monday, February 07, 2005 5:37 PM
> 
> 
> > I'm using Struts 1.2.4.
> >
> > If in my struts-config I have something like this:
> >
> >  > type="org.apache.commons.beanutils.LazyDynaBean"/>
> >
> > How can I get to the resulting form object to 
> setPathValidation(true)?
> >
> > Is there a way I can tell Struts what particular 
> BeanValidatorFom subclass
> > to be using? Going to 1.2.6 is not an option right now.
> >
> > TIA
> >
> > -Joe
> 
> 
> 
> -
> 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: LazyDynaBean question

2005-02-08 Thread Joe Hertz
How about a simpler case then

My real goal is to have DynaForms that are backed my experimental
"semi-lazy-dynabean". 

BeanValidatorForm (while an impressive piece of work IMHO) isn't actually
subclass of a DynaForm (even though it seems like it can be used in almost
the same way). 

The way I see it, the "easiest" way is to implement a FormBeanConfig that
identifies my DynaBean and have all my beans use it? (I can get it to
default by mucking with the ModuleConfig object, right?)

Sorry for asking so many questions on this. I am delving into the innards of
Struts on a level I haven't before, and I think I'm *this* close to fixing
the thing about Struts that I seem to whine about incessantly.

If I have a DynaForm Object backed with my own brand of DynaBean, I'm most
of the way home.

Tx again


> -Original Message-
> From: Niall Pemberton [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 07, 2005 1:01 PM
> To: Struts Users Mailing List
> Subject: Re: LazyDynaBean question
> 
> If you wanted to have Struts use different flavours of 
> BeanValidatorForm to wrap objects then you would have to 
> create your own custom FormBeanConfig implementation and 
> override the createActionForm() method. Then you need to 
> configure struts to use the custom FormBeanConfig and put in 
> place a mechanism to tell your custom FormBeanConfig how to 
> select the various flavours.
> 
> IMO a much simpler soution is to create your own custom 
> ActionForm by extending BeanValidatorForm (like 
> LazyValidatorForm in 1.2.6)
> 
> public class PathBeanValidatorForm extends BeanValidatorForm {
> public LazyValidatorForm() {
> super(new LazyDynaBean());
> setPathValidation(true);
> }
> }
> 
> ... and then cofigure it in the usual way.
> 
>type="myPackage.PathBeanValidatorForm "/>
> 
> Niall
> 
> - Original Message -
> From: "Joe Hertz" <[EMAIL PROTECTED]>
> Sent: Monday, February 07, 2005 5:37 PM
> 
> 
> > I'm using Struts 1.2.4.
> >
> > If in my struts-config I have something like this:
> >
> >  > type="org.apache.commons.beanutils.LazyDynaBean"/>
> >
> > How can I get to the resulting form object to 
> setPathValidation(true)?
> >
> > Is there a way I can tell Struts what particular 
> BeanValidatorFom subclass
> > to be using? Going to 1.2.6 is not an option right now.
> >
> > TIA
> >
> > -Joe
> 
> 
> 
> -
> 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: Can't put scriptlet into onmouseover

2005-02-08 Thread Neil Aggarwal
Daniel:

Is there a more "struts-friendly" way to do rollover buttons?

I have my images served out of apache, not tomcat in order to
make them load as quickly as possible.  Also, since I am using
named virtual hosting, the url to an image will be different
in http and https mode.  That is why I need a piece of code
to generate the url.  It first has to check in what mode the
page has been loaded.

Thanks,
Neil


--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com

> -Original Message-
> From: Daniel Watrous [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 08, 2005 4:50 PM
> To: Struts Users Mailing List
> Subject: Re: Can't put scriptlet into onmouseover
> 
> 
> Neil,
> 
> It seems that the approach to take would be to modify (or 
> replace through 
> inheritance) the link tag.  This way you could eliminate the 
> scriplet in 
> your page and centralize your management of images too.
> 
> I'm not sure that scriptlets are permitted inside jsp tags.  
> The idea of the 
> tag is that it replaces the scriptlet.
> 
> DW
> 
> - Original Message - 
> From: "Neil Aggarwal" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" 
> Sent: Tuesday, February 08, 2005 3:44 PM
> Subject: Can't put scriptlet into onmouseover
> 
> 
> > Hello:
> >
> > I have an html:link tag in my navigation jsp page.
> >
> > I that page, I have an html:link tag that has an on mouseover
> > attribute.  I want to put a scriptlet in the onmouseover
> > to generate the url to the image.  Here is an example:
> >
> >  > onmouseover="setImage('homeButton','<%=
> > PathUtil.getImagePath(request,"layout/homeButtonOver.gif") %>')"
> >
> > But, this fails to compile.  I get this error:
> >
> > org.apache.jasper.JasperException: /navigation.jsp(21,87) 
> equal symbol
> > expected
> >
> > You can see it on this page:
> > 
> http://www.pricetracker.jammconsulting.com/pricetracker/navigation.jsp
> >
> > If I remove the scriptlet and hard code an image, everything is
> > fine.
> >
> > Any ideas?
> >
> > Thanks,
> > Neil
> >
> > --
> > Neil Aggarwal, JAMM Consulting, (972)612-6056, 
> www.JAMMConsulting.com
> > FREE! Valuable info on how your business can reduce 
> operating costs by
> > 17% or more in 6 months or less! 
> http://newsletter.JAMMConsulting.com
> >
> >
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



hml:select question

2005-02-08 Thread Sergey Livanov
I have a vendors collection consisting of bean Vendor( long vendor,
String name )

When I'm writing
   
  
   
   
a null value occur!

MY FORM
private Vendor [] vendors ;
public Vendor [] getVendors()
  { return this.vendors; } 
public void setVendors( Vendor [] newvendors )
  { this.vendors = newvendors; }

private long vendor[] ;
private String name[] ;

public long [] getVendor()
   { return( vendor ) ; }
public void setVendor( long [] newvendor )
   { vendor = newvendor ; }

public String [] getName()
   { return( name ) ; }
public void setName( String [] newname )
   { name = newname ; }


Please , help.

-- 
regards,
 Sergey  mailto:[EMAIL PROTECTED]


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



Re: Application Security

2005-02-08 Thread Tim Christopher
All works fine now - cheers :o)


On Tue, 08 Feb 2005 21:55:03 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
> JDBC driver jar files belong in $TOMCAT_HOME/common/lib (I think that's
> what you are asking).
> 
> Erik
> 
> 
> Tim Christopher wrote:
> 
> >Turned out that the database driver could not be found, which resulted
> >in the same error that I was being given by the Container when it
> >tried to connect for the JDBCRealm.
> >
> >Adding the file to the WEB-INF/lib folder allows a connection to be
> >made from a JSP, however Tomcat still gives the same error as before -
> >does adding the jar to WEB-INF/lib give the container access to the
> >class files stored in it?!
> >
> >The contents of the server.xml file (which does not work correctly) is:
> >>  debug="99"
> >  driverName="com.borland.datastore.jdbc.DataStoreDriver"
> >  connectionURL="jdbc:borland:dslocal:C:\\Documents
> >and Settings\\SIS_Db.jds"
> >  connectionName="sysdba"
> >  connectionPassword="masterkey"
> >  userTable="users"
> >  userNameCol="user_name"
> >  userCredCol="user_pass"
> >  userRoleTable="user_roles"
> >  roleNameCol="role_name" />
> >
> >
> >
> >
> >For anyone with a similar problem the driver (DataStoreDriver) can be
> >found in \lib\jdsserver.jar.  The code I added to the top of
> >the JSP to test the database connection is below:
> >
> ><%
> >
> >try {
> > Class.forName("com.borland.datastore.jdbc.DataStoreDriver");
> >}
> >catch (Exception e) {
> > System.out.println("Driver Error\n" + e);
> >}
> >
> >try {
> > String username = "sysdba";
> > String password = "masterkey";
> > String db_url = "jdbc:borland:dslocal:";
> > String db_file = "C:\\Documents and Settings\\SIS_Db.jds";
> > java.sql.Connection
> >connection=java.sql.DriverManager.getConnection(db_url + db_file,
> >username, password);
> >
> > java.sql.ResultSet
> >rs=connection.createStatement().executeQuery("SELECT * FROM users");
> > System.out.println("Column count is: " + rs.getMetaData().getColumnCount());
> >}
> >catch (Exception e) {
> > System.out.println("Error\n" + e);
> >}
> >
> >%>
> >
> >
> >On Tue, 8 Feb 2005 20:17:49 -0500, David G. Friedman
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>Tim,
> >>
> >>Have you tried using any command line tools to get to your datastore?
> >>Knowing that could rule out permissions issues on the database site as well
> >>as the connection host/port/URL.
> >>
> >>Regards,
> >>David
> >>
> >>-Original Message-
> >>From: Tim Christopher [mailto:[EMAIL PROTECTED]
> >>Sent: Tuesday, February 08, 2005 5:45 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: Application Security
> >>
> >>I managed to solve the first error by reordering the elements within
> >>the server.xml file, however I'm now stuck with the following error
> >>(which occurs when the server is started):
> >>
> >>JDBCRealm[Catalina]: Exception opening database connection
> >>java.sql.SQLException: com.borland.datastore.jdbc.DataStoreDriver
> >>   at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
> >>   at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
> >>   
> >>
> >>Does anyone know if this is a problem with the database driver, or the
> >>location of the database?  I've tried changing the URL to a path that
> >>doesn't exist and I still get the same error, however I'm confident
> >>that the connectionURL is correct as it connects perfectly when using
> >>the same information within JBuilder's database pilot.
> >>
> >>Any suggestions would be appreciated. :o)
> >>
> >>Tim
> >>
> >>On Tue, 8 Feb 2005 12:07:16 -0500, David G. Friedman
> >><[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>>Tim,
> >>>
> >>>Have you also updated your web.xml and Tomcat conifgurations?
> >>>
> >>>-Original Message-
> >>>From: Tim Christopher [mailto:[EMAIL PROTECTED]
> >>>Sent: Tuesday, February 08, 2005 12:05 PM
> >>>To: Struts Users Mailing List
> >>>Subject: Re: Application Security
> >>>
> >>>Cheers for all your advice.
> >>>
> >>>I've just tried implementing the JDBCRealm, though unfortunaltly it
> >>>does not work.  The Log4j error file contains the following:
> >>>
> >>>http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
> >>>JAASRealm.java:269 Unexpected error
> >>>java.lang.SecurityException: Unable to locate a login configuration
> >>>at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
> >>>at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >>>Method)
> >>>
> >>>
> >>>To be honest, I'm not really sure what that means...  All I've done so
> >>>far is copy a simple example and I've got that error.  Do I need to
> >>>add anything to the classpath?
> >>>
> >>>I can post the code I'm using if anything thinks that will help
> >>>
> >>>On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
> >>><[EMAI

Re: Application Security

2005-02-08 Thread Erik Weber
JDBC driver jar files belong in $TOMCAT_HOME/common/lib (I think that's 
what you are asking).

Erik
Tim Christopher wrote:
Turned out that the database driver could not be found, which resulted
in the same error that I was being given by the Container when it
tried to connect for the JDBCRealm.
Adding the file to the WEB-INF/lib folder allows a connection to be
made from a JSP, however Tomcat still gives the same error as before -
does adding the jar to WEB-INF/lib give the container access to the
class files stored in it?!
The contents of the server.xml file (which does not work correctly) is:
  
 

For anyone with a similar problem the driver (DataStoreDriver) can be
found in \lib\jdsserver.jar.  The code I added to the top of
the JSP to test the database connection is below:
<% 

try {
Class.forName("com.borland.datastore.jdbc.DataStoreDriver");
}
catch (Exception e) {
System.out.println("Driver Error\n" + e);
}
try {
String username = "sysdba";
String password = "masterkey";
String db_url = "jdbc:borland:dslocal:";
String db_file = "C:\\Documents and Settings\\SIS_Db.jds";
java.sql.Connection
connection=java.sql.DriverManager.getConnection(db_url + db_file,
username, password);
java.sql.ResultSet
rs=connection.createStatement().executeQuery("SELECT * FROM users");
System.out.println("Column count is: " + rs.getMetaData().getColumnCount()); 
}
catch (Exception e) {
System.out.println("Error\n" + e);
}

%> 

On Tue, 8 Feb 2005 20:17:49 -0500, David G. Friedman
<[EMAIL PROTECTED]> wrote:
 

Tim,
Have you tried using any command line tools to get to your datastore?
Knowing that could rule out permissions issues on the database site as well
as the connection host/port/URL.
Regards,
David
-Original Message-
From: Tim Christopher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 5:45 PM
To: Struts Users Mailing List
Subject: Re: Application Security
I managed to solve the first error by reordering the elements within
the server.xml file, however I'm now stuck with the following error
(which occurs when the server is started):
JDBCRealm[Catalina]: Exception opening database connection
java.sql.SQLException: com.borland.datastore.jdbc.DataStoreDriver
  at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
  at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
  
Does anyone know if this is a problem with the database driver, or the
location of the database?  I've tried changing the URL to a path that
doesn't exist and I still get the same error, however I'm confident
that the connectionURL is correct as it connects perfectly when using
the same information within JBuilder's database pilot.
Any suggestions would be appreciated. :o)
Tim
On Tue, 8 Feb 2005 12:07:16 -0500, David G. Friedman
<[EMAIL PROTECTED]> wrote:
   

Tim,
Have you also updated your web.xml and Tomcat conifgurations?
-Original Message-
From: Tim Christopher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 12:05 PM
To: Struts Users Mailing List
Subject: Re: Application Security
Cheers for all your advice.
I've just tried implementing the JDBCRealm, though unfortunaltly it
does not work.  The Log4j error file contains the following:
http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
JAASRealm.java:269 Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
   at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
   
To be honest, I'm not really sure what that means...  All I've done so
far is copy a simple example and I've got that error.  Do I need to
add anything to the classpath?
I can post the code I'm using if anything thinks that will help
On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
 

The forms for container managed security don't have to be plain html -
   

you
   

can configure in the web.xml custom "Logon"  and "Logon Error" pages
   

which
   

can be jsps, not just plain html. I have a custom tag on each of these
   

pages
 

which writes the fact that a user has arrived at that page to log4j
   

along
   

with details from the request (e.g. IP address). Log4j is pretty
   

powerful
   

in
 

how you can configure it to filter that info and where to send it to.
There are tags in the Jakarta Taglibs which you could use to achieve the
same thing...
  http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
  http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
For example on your "Logon Error Page", you might have something like
this...





Once a user has "logged on", you can get the user name from from the
   

request
 

and then look up the user details wherever they are stored...
request.getUserPrincipal().getName()
The actual form elements required are, as you say, plain html - but is
   

there
 

any need for

Re: Application Security

2005-02-08 Thread Tim Christopher
Turned out that the database driver could not be found, which resulted
in the same error that I was being given by the Container when it
tried to connect for the JDBCRealm.

Adding the file to the WEB-INF/lib folder allows a connection to be
made from a JSP, however Tomcat still gives the same error as before -
does adding the jar to WEB-INF/lib give the container access to the
class files stored in it?!

The contents of the server.xml file (which does not work correctly) is:
   

>>

For anyone with a similar problem the driver (DataStoreDriver) can be
found in \lib\jdsserver.jar.  The code I added to the top of
the JSP to test the database connection is below:

<% 

try {
 Class.forName("com.borland.datastore.jdbc.DataStoreDriver");
}
catch (Exception e) {
 System.out.println("Driver Error\n" + e);
}

try {
 String username = "sysdba";
 String password = "masterkey";
 String db_url = "jdbc:borland:dslocal:";
 String db_file = "C:\\Documents and Settings\\SIS_Db.jds";
 java.sql.Connection
connection=java.sql.DriverManager.getConnection(db_url + db_file,
username, password);
 
 java.sql.ResultSet
rs=connection.createStatement().executeQuery("SELECT * FROM users");
 System.out.println("Column count is: " + rs.getMetaData().getColumnCount()); 
}
catch (Exception e) {
 System.out.println("Error\n" + e);
}

%> 


On Tue, 8 Feb 2005 20:17:49 -0500, David G. Friedman
<[EMAIL PROTECTED]> wrote:
> Tim,
> 
> Have you tried using any command line tools to get to your datastore?
> Knowing that could rule out permissions issues on the database site as well
> as the connection host/port/URL.
> 
> Regards,
> David
> 
> -Original Message-
> From: Tim Christopher [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 08, 2005 5:45 PM
> To: Struts Users Mailing List
> Subject: Re: Application Security
> 
> I managed to solve the first error by reordering the elements within
> the server.xml file, however I'm now stuck with the following error
> (which occurs when the server is started):
> 
> JDBCRealm[Catalina]: Exception opening database connection
> java.sql.SQLException: com.borland.datastore.jdbc.DataStoreDriver
>at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
>at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)
>
> 
> Does anyone know if this is a problem with the database driver, or the
> location of the database?  I've tried changing the URL to a path that
> doesn't exist and I still get the same error, however I'm confident
> that the connectionURL is correct as it connects perfectly when using
> the same information within JBuilder's database pilot.
> 
> Any suggestions would be appreciated. :o)
> 
> Tim
> 
> On Tue, 8 Feb 2005 12:07:16 -0500, David G. Friedman
> <[EMAIL PROTECTED]> wrote:
> > Tim,
> >
> > Have you also updated your web.xml and Tomcat conifgurations?
> >
> > -Original Message-
> > From: Tim Christopher [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, February 08, 2005 12:05 PM
> > To: Struts Users Mailing List
> > Subject: Re: Application Security
> >
> > Cheers for all your advice.
> >
> > I've just tried implementing the JDBCRealm, though unfortunaltly it
> > does not work.  The Log4j error file contains the following:
> >
> > http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
> > JAASRealm.java:269 Unexpected error
> > java.lang.SecurityException: Unable to locate a login configuration
> > at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > 
> >
> > To be honest, I'm not really sure what that means...  All I've done so
> > far is copy a simple example and I've got that error.  Do I need to
> > add anything to the classpath?
> >
> > I can post the code I'm using if anything thinks that will help
> >
> > On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
> > <[EMAIL PROTECTED]> wrote:
> > > The forms for container managed security don't have to be plain html -
> you
> > > can configure in the web.xml custom "Logon"  and "Logon Error" pages
> which
> > > can be jsps, not just plain html. I have a custom tag on each of these
> > pages
> > > which writes the fact that a user has arrived at that page to log4j
> along
> > > with details from the request (e.g. IP address). Log4j is pretty
> powerful
> > in
> > > how you can configure it to filter that info and where to send it to.
> > >
> > > There are tags in the Jakarta Taglibs which you could use to achieve the
> > > same thing...
> > >http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
> > >http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
> > >
> > > For example on your "Logon Error Page", you might have something like
> > > this...
> > >
> > > 
> > > 
> > >  
> > >  
> > > 
> > >
> > > Once a user has "logged on", you can get the user name from from the
> > request
> > > and then look up the user details wherever 

RE: wizard form and checkboxes that won't turn off

2005-02-08 Thread Daniel Lipofsky
That's definitely one solution.  The other is to have
an onsubmit method on the form with javascript to
iterate over all the input elements in the form,
find unchecked check-boxes, and create a hidden
input with the same name and a value of "false".
- Dan

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, February 03, 2005 8:07 PM
> To: Struts Users Mailing List
> Subject: Re: wizard form and checkboxes that won't turn off
> 
> The problem is that the browser submits a value of "on", when 
> you check a 
> checkbox and submit the form.  However, if you uncheck the 
> checkbox and 
> submit the form, the browser does _not_ submit "off" or 
> "false" or anything. 
> So, with your form sitting in session, how will it know that 
> you want it 
> "off"?
> 
> Here's how:  you need to implement reset() method on your 
> form.  In that 
> method you need to set the field that is backing the checkbox 
> to "false" or 
> "off".  When Struts processes the request, it will call reset, then 
> repopulate based on requesteffectively giving the 
> _appearance_ that the 
> browser sent "off".
> 
> - Original Message - 
> From: "Janice" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, February 03, 2005 6:32 PM
> Subject: wizard form and checkboxes that won't turn off
> 
> 
> Could somebody please refer me to a solution to this?
> 
> I have a form bean (session-scoped) that is displayed over 3 
> pages.  There
> are "back" and "next" buttons.  Once a checkbox is selected 
> and the user has
> moved to another page, it can't be cleared again.  I have 
> read that this is
> because the checkbox item is now in the session and simply 
> unchecking it
> does not remove it from the session.  What I haven't found is 
> a solution or
> workaround.
> 
> I am using struts 1.1.
> 
> Thanks very much in advance,
> J


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



RE: Application Security

2005-02-08 Thread David G. Friedman
Tim,

Have you tried using any command line tools to get to your datastore?
Knowing that could rule out permissions issues on the database site as well
as the connection host/port/URL.

Regards,
David

-Original Message-
From: Tim Christopher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 5:45 PM
To: Struts Users Mailing List
Subject: Re: Application Security


I managed to solve the first error by reordering the elements within
the server.xml file, however I'm now stuck with the following error
(which occurs when the server is started):

JDBCRealm[Catalina]: Exception opening database connection
java.sql.SQLException: com.borland.datastore.jdbc.DataStoreDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)


Does anyone know if this is a problem with the database driver, or the
location of the database?  I've tried changing the URL to a path that
doesn't exist and I still get the same error, however I'm confident
that the connectionURL is correct as it connects perfectly when using
the same information within JBuilder's database pilot.

Any suggestions would be appreciated. :o)

Tim

On Tue, 8 Feb 2005 12:07:16 -0500, David G. Friedman
<[EMAIL PROTECTED]> wrote:
> Tim,
>
> Have you also updated your web.xml and Tomcat conifgurations?
>
> -Original Message-
> From: Tim Christopher [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 08, 2005 12:05 PM
> To: Struts Users Mailing List
> Subject: Re: Application Security
>
> Cheers for all your advice.
>
> I've just tried implementing the JDBCRealm, though unfortunaltly it
> does not work.  The Log4j error file contains the following:
>
> http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
> JAASRealm.java:269 Unexpected error
> java.lang.SecurityException: Unable to locate a login configuration
> at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> 
>
> To be honest, I'm not really sure what that means...  All I've done so
> far is copy a simple example and I've got that error.  Do I need to
> add anything to the classpath?
>
> I can post the code I'm using if anything thinks that will help
>
> On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
> <[EMAIL PROTECTED]> wrote:
> > The forms for container managed security don't have to be plain html -
you
> > can configure in the web.xml custom "Logon"  and "Logon Error" pages
which
> > can be jsps, not just plain html. I have a custom tag on each of these
> pages
> > which writes the fact that a user has arrived at that page to log4j
along
> > with details from the request (e.g. IP address). Log4j is pretty
powerful
> in
> > how you can configure it to filter that info and where to send it to.
> >
> > There are tags in the Jakarta Taglibs which you could use to achieve the
> > same thing...
> >http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
> >http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
> >
> > For example on your "Logon Error Page", you might have something like
> > this...
> >
> > 
> > 
> >  
> >  
> > 
> >
> > Once a user has "logged on", you can get the user name from from the
> request
> > and then look up the user details wherever they are stored...
> >  request.getUserPrincipal().getName()
> >
> > The actual form elements required are, as you say, plain html - but is
> there
> > any need for special tags since the action your posting to is fixed?
> >
> > Niall
> >
> > - Original Message -
> > From: "Tim Christopher" <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 08, 2005 2:08 AM
> >
> > > I've recently discovered that it is not possible to map an action to
> > > j_security_check.  Given this situation how is it possible to populate
> > > a form bean with user data, or create a log of any failed login
> > > attempts (bad username / password) if the container takes control of
> > > the entire login process?
> > >
> > > Looking back at previous posts to the newsgroup I can see that in the
> > > past people have just used plain html to produce the j_security_check
> > > form.  Is it possible to do this using the  tag, but so
> > > that it does not require a Struts action mapping for j_security_check
> > > to be present?
> > >
> > > I was currently intending on using JDBCRealm and the security-filter
> > > to control the site's security, though given the above problems I'm
> > > starting to think there might be a better way?  Or are these problems
> > > everyone has already solved, as surely some form of login system is
> > > present in the vast majority of Struts applications.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -

Re: Trying to test an Action using only JUnit

2005-02-08 Thread Hubert Rabago
Have you tried using an ActionForward as opposed to a ForwardConfig?


On Tue, 8 Feb 2005 16:56:29 -0600, Simon Chappell
<[EMAIL PROTECTED]> wrote:
> I'm trying to write a JUnit test for an Action and I'm having problems
> with ClassCastExceptions on the findForward() method of ActionMapping.
> I am not in a position to try any other packages or tools, so I have
> to roll this one myself.
> 
> I have narrowed the problem down to getting the ClassCastException in
> the following line of the action under test:
> 
> ActionForward forward = mapping.findForward("success");
> 
> A fairly straight-forward thing to do in an Action,so it must be in my
> setting up of the ActionMapping. Here's the setup in my test:
> 
> // Now build an ForwardConfig
> ForwardConfig config = new ForwardConfig("success", "/noOp.jsp", false);
> config.freeze();
> assertEquals("ForwardConfig[name=success,path=/noOp.jsp,redirect=false,contextRelative=false]",
> config.toString());
> 
> The assertEquals passes, so I hope that my ForwardConfig was correct.
> Here's my setup of the ActionMapping:
> 
> // Build an ActionMapping for our ForwardConfig
> ActionMapping mapping  = new ActionMapping();
> mapping.addForwardConfig(config);
> 
> // Set remaining attributes
> mapping.setAttribute("noOpForm");
> mapping.setInput("/noOp.jsp");
> mapping.setName("noOpForm");
> mapping.setPath("/noOp");
> mapping.setScope("request");
> mapping.setType("com.landsend.ebs.jokertags.actions.NoOpAction");
> mapping.freeze();
> assertEquals("noOpForm", mapping.getAttribute());
> assertEquals("/noOp.jsp", mapping.getInput());
> assertEquals("noOpForm", mapping.getName());
> assertEquals("/noOp", mapping.getPath());
> assertEquals("request", mapping.getScope());
> assertEquals("com.landsend.ebs.jokertags.actions.NoOpAction",
> mapping.getType());
> assertEquals("ActionConfig[path=/noOp,attribute=noOpForm,input=/noOp.jsp,name=noOpForm,scope=request,type=com.landsend.ebs.jokertags.actions.NoOpAction",
> mapping.toString());
> 
> Again, all these asserts pass, so I hope that means that my
> ActionMapping is right.
> 
> I call the action using the line:
> 
> ActionForward forward = action.execute(mapping, form, null, null);
> 
> I'm not using the HttpServletRequest or HttpServletResponse objects in
> the action, so they're null for now.
> 
> What am I doing wrong?
> 
> Simon (the Lands' End guy now using GMail :-)
> 
> -
> 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]



Trying to test an Action using only JUnit

2005-02-08 Thread Simon Chappell
I'm trying to write a JUnit test for an Action and I'm having problems
with ClassCastExceptions on the findForward() method of ActionMapping.
I am not in a position to try any other packages or tools, so I have
to roll this one myself.

I have narrowed the problem down to getting the ClassCastException in
the following line of the action under test:

ActionForward forward = mapping.findForward("success");

A fairly straight-forward thing to do in an Action,so it must be in my
setting up of the ActionMapping. Here's the setup in my test:

// Now build an ForwardConfig
ForwardConfig config = new ForwardConfig("success", "/noOp.jsp", false);
config.freeze();
assertEquals("ForwardConfig[name=success,path=/noOp.jsp,redirect=false,contextRelative=false]",
config.toString());

The assertEquals passes, so I hope that my ForwardConfig was correct.
Here's my setup of the ActionMapping:

// Build an ActionMapping for our ForwardConfig
ActionMapping mapping  = new ActionMapping();
mapping.addForwardConfig(config);

// Set remaining attributes
mapping.setAttribute("noOpForm");
mapping.setInput("/noOp.jsp");
mapping.setName("noOpForm");
mapping.setPath("/noOp");
mapping.setScope("request");
mapping.setType("com.landsend.ebs.jokertags.actions.NoOpAction");
mapping.freeze();
assertEquals("noOpForm", mapping.getAttribute());
assertEquals("/noOp.jsp", mapping.getInput());
assertEquals("noOpForm", mapping.getName());
assertEquals("/noOp", mapping.getPath());
assertEquals("request", mapping.getScope());
assertEquals("com.landsend.ebs.jokertags.actions.NoOpAction",
mapping.getType());
assertEquals("ActionConfig[path=/noOp,attribute=noOpForm,input=/noOp.jsp,name=noOpForm,scope=request,type=com.landsend.ebs.jokertags.actions.NoOpAction",
mapping.toString());

Again, all these asserts pass, so I hope that means that my
ActionMapping is right.

I call the action using the line:

ActionForward forward = action.execute(mapping, form, null, null);

I'm not using the HttpServletRequest or HttpServletResponse objects in
the action, so they're null for now.

What am I doing wrong?

Simon (the Lands' End guy now using GMail :-)

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



Re: Can't put scriptlet into onmouseover

2005-02-08 Thread Daniel Watrous
Neil,
It seems that the approach to take would be to modify (or replace through 
inheritance) the link tag.  This way you could eliminate the scriplet in 
your page and centralize your management of images too.

I'm not sure that scriptlets are permitted inside jsp tags.  The idea of the 
tag is that it replaces the scriptlet.

DW
- Original Message - 
From: "Neil Aggarwal" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Tuesday, February 08, 2005 3:44 PM
Subject: Can't put scriptlet into onmouseover


Hello:
I have an html:link tag in my navigation jsp page.
I that page, I have an html:link tag that has an on mouseover
attribute.  I want to put a scriptlet in the onmouseover
to generate the url to the image.  Here is an example:
')"
But, this fails to compile.  I get this error:
org.apache.jasper.JasperException: /navigation.jsp(21,87) equal symbol
expected
You can see it on this page:
http://www.pricetracker.jammconsulting.com/pricetracker/navigation.jsp
If I remove the scriptlet and hard code an image, everything is
fine.
Any ideas?
Thanks,
Neil
--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: Application Security

2005-02-08 Thread Tim Christopher
I managed to solve the first error by reordering the elements within
the server.xml file, however I'm now stuck with the following error
(which occurs when the server is started):

JDBCRealm[Catalina]: Exception opening database connection
java.sql.SQLException: com.borland.datastore.jdbc.DataStoreDriver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:589)
at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:663)


Does anyone know if this is a problem with the database driver, or the
location of the database?  I've tried changing the URL to a path that
doesn't exist and I still get the same error, however I'm confident
that the connectionURL is correct as it connects perfectly when using
the same information within JBuilder's database pilot.

Any suggestions would be appreciated. :o)

Tim

On Tue, 8 Feb 2005 12:07:16 -0500, David G. Friedman
<[EMAIL PROTECTED]> wrote:
> Tim,
> 
> Have you also updated your web.xml and Tomcat conifgurations?
> 
> -Original Message-
> From: Tim Christopher [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 08, 2005 12:05 PM
> To: Struts Users Mailing List
> Subject: Re: Application Security
> 
> Cheers for all your advice.
> 
> I've just tried implementing the JDBCRealm, though unfortunaltly it
> does not work.  The Log4j error file contains the following:
> 
> http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
> JAASRealm.java:269 Unexpected error
> java.lang.SecurityException: Unable to locate a login configuration
> at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> 
> 
> To be honest, I'm not really sure what that means...  All I've done so
> far is copy a simple example and I've got that error.  Do I need to
> add anything to the classpath?
> 
> I can post the code I'm using if anything thinks that will help
> 
> On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
> <[EMAIL PROTECTED]> wrote:
> > The forms for container managed security don't have to be plain html - you
> > can configure in the web.xml custom "Logon"  and "Logon Error" pages which
> > can be jsps, not just plain html. I have a custom tag on each of these
> pages
> > which writes the fact that a user has arrived at that page to log4j along
> > with details from the request (e.g. IP address). Log4j is pretty powerful
> in
> > how you can configure it to filter that info and where to send it to.
> >
> > There are tags in the Jakarta Taglibs which you could use to achieve the
> > same thing...
> >http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
> >http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
> >
> > For example on your "Logon Error Page", you might have something like
> > this...
> >
> > 
> > 
> >  
> >  
> > 
> >
> > Once a user has "logged on", you can get the user name from from the
> request
> > and then look up the user details wherever they are stored...
> >  request.getUserPrincipal().getName()
> >
> > The actual form elements required are, as you say, plain html - but is
> there
> > any need for special tags since the action your posting to is fixed?
> >
> > Niall
> >
> > - Original Message -
> > From: "Tim Christopher" <[EMAIL PROTECTED]>
> > Sent: Tuesday, February 08, 2005 2:08 AM
> >
> > > I've recently discovered that it is not possible to map an action to
> > > j_security_check.  Given this situation how is it possible to populate
> > > a form bean with user data, or create a log of any failed login
> > > attempts (bad username / password) if the container takes control of
> > > the entire login process?
> > >
> > > Looking back at previous posts to the newsgroup I can see that in the
> > > past people have just used plain html to produce the j_security_check
> > > form.  Is it possible to do this using the  tag, but so
> > > that it does not require a Struts action mapping for j_security_check
> > > to be present?
> > >
> > > I was currently intending on using JDBCRealm and the security-filter
> > > to control the site's security, though given the above problems I'm
> > > starting to think there might be a better way?  Or are these problems
> > > everyone has already solved, as surely some form of login system is
> > > present in the vast majority of Struts applications.
> >
> > -
> > 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]



Can't put scriptlet into onmouseover

2005-02-08 Thread Neil Aggarwal
Hello:

I have an html:link tag in my navigation jsp page.

I that page, I have an html:link tag that has an on mouseover
attribute.  I want to put a scriptlet in the onmouseover
to generate the url to the image.  Here is an example:

')" 
 
But, this fails to compile.  I get this error:

org.apache.jasper.JasperException: /navigation.jsp(21,87) equal symbol
expected

You can see it on this page:
http://www.pricetracker.jammconsulting.com/pricetracker/navigation.jsp

If I remove the scriptlet and hard code an image, everything is
fine.

Any ideas?

Thanks,
Neil

--
Neil Aggarwal, JAMM Consulting, (972)612-6056, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com


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



Re: Trouble with DispatchAction and ValidatorActionForm

2005-02-08 Thread Daniel Watrous
Thanks for the advice!
I have enabled debug and found as you suggested these lines at the bottom of 
my file:

16:32:57,446 DEBUG RequestProcessor:787 -  Populating bean properties from 
this request
16:32:57,459 DEBUG RequestProcessor:919 -  Validating input form properties
16:32:57,460 DEBUG PropertyMessageResources:134 - 
getMessage(en_US,prompt.stakeName)
16:32:57,461 DEBUG PropertyMessageResources:226 - loadLocale(en_US)
16:32:57,461 DEBUG PropertyMessageResources:226 - loadLocale(en)
16:32:57,462 DEBUG PropertyMessageResources:226 - loadLocale()
..[and so on for each field]
16:32:57,479 DEBUG RequestProcessor:951 -  Validation failed, returning to 
'/manage_stake.jsp'

Shouldn't this mean that manage_stake.jsp should be displayed?  That is the 
last line in my log.  What shall I look to now?

DW
- Original Message - 
From: "Niall Pemberton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 07, 2005 4:19 PM
Subject: Re: Trouble with DispatchAction and ValidatorActionForm


You need to know what struts is trying to do. I suggest configuring the
logging to "debug" - then you should find out where its trying to go to 
and
what the problem is.

If validation is being performed but failing then you should see something
like...
  DEBUG Validating input form properties
  DEBUG Validation failed, returning to '/manage_stake.jsp'
If validation either isn't being performed or no errors are found, then it
should tell you where its forwarding to, something like...
  DEBUG processForwardConfig(ForwardConfig[name=?,path=...])
Blank pages are usually when either you haven't configured things 
properly,
or somethings blowing up on the page. Either way the logs should tell you.

Niall
P.S. In your struts config, you have  a "failure" forward for the mapping
that doesn't look like a proper path - although the code you say your 
using
doesn't show it being used...



- Original Message - 
From: "Daniel Watrous" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 07, 2005 10:34 PM
Subject: Re: Trouble with DispatchAction and ValidatorActionForm


Thank you for the suggestion.  I tried this and am still getting only a
BLANK page with validate="true".  Are there any other ideas?
DW
- Original Message - 
From: "Niall Pemberton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, February 07, 2005 2:19 PM
Subject: Re: Trouble with DispatchAction and ValidatorActionForm

> Looks to me like your missing a "/" off your input parameter
>
> ---> input="manage_stake.jsp">
>
> Niall
>
> P.S. don't forget to set validate back to "true".

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


JSP produces invalid XML?

2005-02-08 Thread Laurent
Hi,
There is something I do not understand with the way JSP outputs XML:
If in my source JSP file, I have something like this:
a & b
The XML parser should interpret this string as "a & b" and represent it 
internally as "a & b". However, when it ouputs that data to the XML file 
being sent back to the browser, in this string "a & b" the ampersand 
should be escaped as "a & b", as the destination is XML.
The problem is the output I get is simply "a & b". I believe this 
behaviour to be wrong (as the resulting XML file does not comply to the 
specs).

Of course, if have included a  tag at the top of my file 
(with the proper namespace set).

Is there a problem with my configuration of struts or tomcat, or is this 
behaviour intended for some reason, or is this a bug, or am I just 
missing something here?

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


RE: Redirecting back to input

2005-02-08 Thread Chaikin, Yaakov Y.
Karan,

I think you missed the point a little bit. I'll leave the discussion of
whether it's a good idea to let the user access a JSP page directly or not
out of this. Truly, there is nothing wrong with doing that if all you are
doing is setting up the form on that page. But, leaving that aside... I am
not really following you when you say "action bean" and making sure your
variables are set up correctly.

The point of all this was to solve the problem of potentially confusing the
user who will see the same page in front of them, but the URL will be
different. In your case, your form will redisplay with some error messages
on it but the URL will end in adduser.do.

The truth is that I am myself not so sure this is such a big deal and would
confuse the user that much. Someone I know contends that it is and wanted to
know if there was a workaround to make struts keep the original URL in
place.

IMHO, all this is really academic since I would never want to store the form
data on the session unless there was some pressing need to do this. Just to
avoid this possible confusing seems not worth it. But... if it was or wasn't
a good idea wasn't the question. :)

Thanks,
Yaakov.

-Original Message-
From: Karan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 4:48 PM
To: Struts Users Mailing List
Subject: Re: Redirecting back to input

This method will cause an actual redirect, and so, the user will see the
correct name of the action in the address bar.

But it IS a bad idea to be showing the url of the webpage. If you can,
you want to use only action URLs, because in ur action bean you can
check if u have ur variables set up correctly etc etc, which being unset
would cause mayhem on a webopage.
Also its supposed to reset the request variables, but I have not yet
faced a problem. I hardly save any variables in the session scope --
most of the times, i save my objects in the request scope only.

Also, instead of using ActionErrors, a more elegant approach is to
forward to the same action which calls the form-bean, for example:
 
 
   

   
   
  
   

So everytime I forward to main.do, I can display my webpage which is
main.ftl (freemarker), which actually the user does not know even
exists. And after performing the requested action, I can either display
my form again (in case of an error) or move on.

Someone, plz correct me if im wrong.

Karan

Joe Germuska wrote:

> At 4:34 PM -0500 2/7/05, Chaikin, Yaakov Y. wrote:
>
>> Actually, I traced this in code also and I think it already does
>> mapping.findForward(input) inside
>>
>> In either case, how could you specify to Struts to construct a
>> ForwardConfig
>> object with redirect=true??
>
>
> Either nested within an  element, or in ,
> simply use:
> 
>
> Joe
>
>
>
>> Thanks,
>> Yaakov.
>>
>> -Original Message-
>> From: Joe Germuska [mailto:[EMAIL PROTECTED]
>> Sent: Monday, February 07, 2005 4:03 PM
>> To: Jeff Beal; user@struts.apache.org
>> Subject: Re: Redirecting back to input
>>
>> At 3:32 PM -0500 2/7/05, Jeff Beal wrote:
>>
>>> I looked at the source of the RequestProcessor.processValidate()
>>> method, and it certainly doesn't look like there's any way to
>>> redirect on validation error without modifying the behavior there.
>>
>>
>> I think that if in your  element in Struts config, you use:
>>  
>>
>> then Struts will do a "mapping.findForward(input)" upon validation
>> failure.  This forward could be defined with "redirect='true'"
>>
>> That doesn't help with getting the errors stored in session scope
>> instead of request scope, though.
>>
>> Joe
>>
>> --
>> Joe Germuska
>> [EMAIL PROTECTED]
>> http://blog.germuska.com
>> "Narrow minds are weapons made for mass destruction"  -The Ex
>>
>> -
>> 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]
>
>
>
> --
> Joe Germuska
> [EMAIL PROTECTED]
> http://blog.germuska.com
> "Narrow minds are weapons made for mass destruction"  -The Ex
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> .
>

--
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/


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

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



Problem with checkbox

2005-02-08 Thread Norris Shelton
I have a checkbox drawn by:

${recordType.description} 


The form is defined as:

 ...
 
 
 ...


The check box displays correct and even defaults.  If I uncheck
the box and submit, when it failes validation, it is still
checked.


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



Re: Redirecting back to input

2005-02-08 Thread Karan
This method will cause an actual redirect, and so, the user will see the
correct name of the action in the address bar.
But it IS a bad idea to be showing the url of the webpage. If you can,
you want to use only action URLs, because in ur action bean you can
check if u have ur variables set up correctly etc etc, which being unset
would cause mayhem on a webopage.
Also its supposed to reset the request variables, but I have not yet
faced a problem. I hardly save any variables in the session scope --
most of the times, i save my objects in the request scope only.
Also, instead of using ActionErrors, a more elegant approach is to
forward to the same action which calls the form-bean, for example:


  
  
  
 
  
So everytime I forward to main.do, I can display my webpage which is
main.ftl (freemarker), which actually the user does not know even
exists. And after performing the requested action, I can either display
my form again (in case of an error) or move on.
Someone, plz correct me if im wrong.
Karan
Joe Germuska wrote:
At 4:34 PM -0500 2/7/05, Chaikin, Yaakov Y. wrote:
Actually, I traced this in code also and I think it already does
mapping.findForward(input) inside
In either case, how could you specify to Struts to construct a 
ForwardConfig
object with redirect=true??

Either nested within an  element, or in , 
simply use:


Joe

Thanks,
Yaakov.
-Original Message-
From: Joe Germuska [mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005 4:03 PM
To: Jeff Beal; user@struts.apache.org
Subject: Re: Redirecting back to input
At 3:32 PM -0500 2/7/05, Jeff Beal wrote:
I looked at the source of the RequestProcessor.processValidate()
method, and it certainly doesn't look like there's any way to
redirect on validation error without modifying the behavior there.

I think that if in your  element in Struts config, you use:
 
then Struts will do a "mapping.findForward(input)" upon validation
failure.  This forward could be defined with "redirect='true'"
That doesn't help with getting the errors stored in session scope
instead of request scope, though.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex
-
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]

--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
--
CM II
Resolution Systems Inc.
/-- never compromise. what if you compromise and lose? --/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Connecting buttons to go to next pages.-Help!

2005-02-08 Thread Erik Weber

Sab wrote:
I have one action defined in struts config file .

Name="itemsearchForm"
Scope="session"
type="com.my.ItemSearchAction"> 

I have defined in global forward the 


I have a tiles definition which takes me to 
Itemsearch.jsp

This jsp has 2 buttons.-Export and Cancel.
When I click on Export it takes me to another page called itemlist(which
again has 3 more buttons) page. When I click cancel it takes me to main
page .
How to connect the buttons to go to the further pages.
Please help!
 

Perhaps I don't understand your questions fully, but it seems like you 
are struggling with some basics here, so I'm going to try to give you a 
summary. Sorry if you already know all this (hard for me to tell).

The way you learn to "connect" buttons to facilitate page navigation is 
to first understand the basics of using HTTP in Servlet applications, 
regardless of Struts. In a typical scenario, the first user page 
(usually rendered as the response to a GET request -- a click on a 
hyperlink or direct entry into a browser address bar) contains an HTML 
form. An HTML form has at least two important parts, and usually three: 
The form fields (optional) for accepting user data, the action URL, 
which is where the browser's POST request will be sent, and the submit 
button, which causes the POST request (containing the user data if any) 
to be sent to the action URL. The server's response to the POST request 
is the next page your user will see. (Therefore, clicking the button on 
page 1 "takes" the user to page 2.) Struts does not abandon this concept 
for something else; it provides a framework that solidifies the concept 
for Servlet developers.

You generate an HTML form in a Struts JSP using the Struts Form 
(html:form) tag and related tags (all the other HTML tags). The use of 
these tags is all in the documentation under "User and Developer 
Guides". But, for example, you might combine the html:form tag, the 
html:cancel tag and the html:submit tag to create the simplest of forms. 
The tags just render HTML like any hand-made HTML form would contain, 
with added benefits (some of which are required by Struts) that will 
become clear as you learn to use Struts.

Servlets allow you to provide "virtual" action URLs on your Web server, 
basically, meaning that the action URL of your form (or the URL of a 
hyperlink for that matter) doesn't have to point to an actual HTML/JSP 
page that will be used in rendering the response. Rather, it can be a 
"logical" URL that triggers a server action -- typically this action 
does use some HTML/JSP page to render the response. The point is that 
the server gets a chance to interpret the URL and do interesting things 
*before* rendering the response, whereas a typical, dumb (non-Servlet, 
non-CGI enabled) Web server simply maps request URLs to response pages.

In the Struts world, these "virtual" URLs are your Action Mappings (such 
as yours with the "/itemsearch" path). The action URL (specified in your 
html:form tag) points to one of these Action Mappings. When the user 
clicks the submit button, the browser sends the POST request containing 
the form data to the server. The server, running Struts, routes the 
request to the Struts controller Servlet. The controller determines 
which Action Mapping matches the URL of the request (all configured in 
struts-config.xml), and consults the Action (your Java class) that 
corresponds to that mapping to manufacture the response (typically by 
examining the user's form input if any, gathering data from a database, 
putting the data in a place where the JSP needed to render the response 
can find it, and finally forwarding control to the JSP so that it can 
render the response using the gathered data -- the JSP serves as a 
template while the data gathered by the Action gives you the values that 
are not part of the template).

For me, the easiest way to get going with a new technology is to find an 
example that does something analogous to what I desire and to study it 
and then modify it for my circumstances. Have you tried going through 
some good examples? The wiki is a good place:

http://wiki.apache.org/struts/StrutsArticles
In particular, the second link ("Struttin' With Struts") was helpful to 
me when I was getting started, because the author gets right into it 
with examples, and the site is about as well organized as a tutorial 
site can be. Also, Struts comes bundled with a couple examples that 
you'll want to study (I would try a tutorial first).

So one more time, the basic parts involved in what you are trying to do:
1) a page containing an HTML form (rendered via JSP and Struts HTML tags 
-- this is page 1, which contains your button) with an action URL that 
corresponds to an Action Mapping
2) a response page (JSP) that is a template requiring data that is 
dynamic -- from your database -- to be complete (this is page 2)
3) an Action -- Java code that gathers the database data needed to 
complete the response JSP,

Re: I have a jsp. that has two included jsp's that are actually struts actions but the response only

2005-02-08 Thread Joe Germuska
At 2:15 PM -0700 2/8/05, Eric Lemle wrote:
So how does one get the final HTML from two Actions into the same page?
I am pretty sure that Tiles will do includes instead of forwards 
where necessary so that you can use actions as the source of 
 components.  I've never had to use it, but someone 
recently pointed out a bug in the chain version of TilesPreProcess 
which was causing this to break.

Joe

Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]

 [EMAIL PROTECTED] 2/3/2005 5:28:09 PM >>>
Sort of. Remember, the "normal" result of a Struts action is the
equivalent
of RequestDispatcher.forward(). So, I imagine you're also seeing an
IllegalStateException as well. You've got the equivalent of the
following:
includer.jsp:
-
<@% page contentType="text/plain" %>
Before forwarder1:

After forwarder1:
Before forwarder2:

After forwarder2:
forwarder1.jsp:
---

forwarder2.jsp:
---

content1.jsp:
-
content1.jsp
content2.jsp:
-
content2.jsp
Which should generate:
content1.jsp
Along with raising an IllegalStateException.
Eric Lemle wrote:
 I have a jsp. that has two included jsp's that are actually struts
 actions but the response only returns the first one.
 I have tried flush="false" (Doesn't matter)
 I have tried the 
 
 />
 
 
 flush="true"
 />
 
 Eric D. Lemle
 Senior Programmer / Analyst
 Intermountain Health Care
 36 South State Street, Suite 1100
 Salt Lake City, Utah 84111
 United States of America (USA)
 (801) 442-3688 -- e-mail: [EMAIL PROTECTED]
--
Kris Schneider 
D.O.Tech   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: Extending Action Mapping

2005-02-08 Thread Joe Germuska
At 3:35 PM -0500 2/8/05, Todd Nine wrote:
Thanks for the help, given the Java Bean standards of getters and
setters, is there any way to set a Map or a List from the xml file
(something like the way Spring Framework does it)?   And thanks for
the naming complement, we get quite a few amusing ones, like
LaserBeanUtils... :)
There is no way to set a map or a list at the moment.  It wouldn't be 
all that hard to write some Digester rules that did it, but I haven't 
heard much call for it so far.It is possible to add your own 
rules to the Digester ruleset used during struts-config processing, 
but is that really worth it?

For an immediate solution, I'd suggest just writing your mapping 
class to fit the constraints; just change the name of your method 
from getIgnore() to getIgnoreList().

There has been a bit of discussion on the dev list about using 
Spring, or other alternative ways for configuring the system of 
objects in a Struts application; my conclusion at this point is that 
we are better off refining the model before changing configuration 
approaches -- that is, to design a "Struts API bean" which 
encapsulates what a running Struts application does without being so 
entangled with the ActionServlet and the Servlet API.

Joe

On Tue, 8 Feb 2005 15:23:41 -0500, Benedict, Paul C
<[EMAIL PROTECTED]> wrote:
 If your setter (for setIgnore?) does not have the same type as its getter,
 it is probably ignored. The JavaBean spec is really strict with its
 requirement for properties.
 By the way, "LaserActionMapping" is the coolest action classname I've ever
 seen. If there was an award for these things, I think you would win :o)
 -Original Message-
 From: Todd Nine [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 08, 2005 3:20 PM
 To: Struts Users Mailing List
 Subject: Extending Action Mapping
 Hi all, I am trying to extend the ActionMapping Class with my own,
 LaserActionMapping.  I have a List that I want to populate with
 MessageResource keys,.  I have the configuration below, and my class.
 The setter is never being called, does anyone have any suggestions?
 
 
 
 
 
 
 
 
 
 
 
 
 /*
  * Created on Feb 8, 2005
  *
  */
 package com.llic.web.action;
 import java.util.ArrayList;
 import java.util.List;
 import org.apache.struts.action.ActionMapping;
 /**
  * @author Todd Nine
  * This implementation allows for multiple keys to be set.
  * This will allow us to skip validation on certain mappings.
  */
 public class LaserActionMapping extends ActionMapping {
 //map of parameters to ignore
 private List ignore;
 /**
 >  * Constructor for LaserActionMapping.
  */
 public LaserActionMapping() {
 super();
 ignore = new ArrayList();
 }
 /**
  * @param map
  */
 public void setIgnore(String value) {
 ignore.add(value);
 }
 /**
  * @return A list of keys to ignore
  */
 public List getIgnore() {
 return ignore;
 }
 }
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
--
 Notice:  This e-mail message, together with any attachments, 
contains information of Merck & Co., Inc. (One Merck Drive, 
Whitehouse Station, New Jersey, USA 08889), and/or its affiliates 
(which may be known outside the United States as Merck Frosst, 
Merck Sharp & Dohme or MSD and in Japan, as Banyu) that may be 
confidential, proprietary copyrighted and/or legally privileged. It 
is intended solely for the use of the individual or entity named on 
this message.  If you are not the intended recipient, and have 
received this message in error, please notify us immediately by 
reply e-mail and then delete it from your system.

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

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction"  -The Ex

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


Re: I have a jsp. that has two included jsp's that are actually struts actions but the response only

2005-02-08 Thread Eric Lemle
So how does one get the final HTML from two Actions into the same page?

Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111 
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]


>>> [EMAIL PROTECTED] 2/3/2005 5:28:09 PM >>>
Sort of. Remember, the "normal" result of a Struts action is the
equivalent 
of RequestDispatcher.forward(). So, I imagine you're also seeing an 
IllegalStateException as well. You've got the equivalent of the
following:

includer.jsp:
-
<@% page contentType="text/plain" %>

Before forwarder1:

After forwarder1:

Before forwarder2:

After forwarder2:

forwarder1.jsp:
---


forwarder2.jsp:
---


content1.jsp:
-
content1.jsp

content2.jsp:
-
content2.jsp

Which should generate:

content1.jsp

Along with raising an IllegalStateException.

Eric Lemle wrote:
> I have a jsp. that has two included jsp's that are actually struts
> actions but the response only returns the first one.
> I have tried flush="false" (Doesn't matter)
> I have tried the  Is there something in the framework that is preventing this?
> 
> 
> 
> 
> 
> 
> 
>  />
> 
> 
> 
> Eric D. Lemle
> Senior Programmer / Analyst
> Intermountain Health Care
> 36 South State Street, Suite 1100
> Salt Lake City, Utah 84111 
> United States of America (USA)
> (801) 442-3688 -- e-mail: [EMAIL PROTECTED] 

-- 
Kris Schneider 
D.O.Tech   

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


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



RE: Extending Action Mapping

2005-02-08 Thread Fogleson, Allen
A workaround - albeit maybe not the best

public void setAddIgnore(String value) {
  ignore.add(value);
}

public void setIgnore(List value) {
  this.ignore = value;
}
 
/**
* @return A list of keys to ignore
*/
public List getIgnore() {
  return ignore;
}

then instead of 


use


I don't like it either... but it works. 

Al

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



Re: [OT-izzy]

2005-02-08 Thread Vic
Right back at ya:
http://www.webdez.net/alig
.V
James Mitchell wrote:
http://sites.gizoogle.com/?url=http://struts.apache.org

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

--
Forums, Boards, Blogs and News in RiA 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Extending Action Mapping

2005-02-08 Thread Todd Nine
Thanks for the help, given the Java Bean standards of getters and
setters, is there any way to set a Map or a List from the xml file
(something like the way Spring Framework does it)?   And thanks for
the naming complement, we get quite a few amusing ones, like
LaserBeanUtils... :)


On Tue, 8 Feb 2005 15:23:41 -0500, Benedict, Paul C
<[EMAIL PROTECTED]> wrote:
> If your setter (for setIgnore?) does not have the same type as its getter,
> it is probably ignored. The JavaBean spec is really strict with its
> requirement for properties.
> 
> By the way, "LaserActionMapping" is the coolest action classname I've ever
> seen. If there was an award for these things, I think you would win :o)
> 
> -Original Message-
> From: Todd Nine [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 08, 2005 3:20 PM
> To: Struts Users Mailing List
> Subject: Extending Action Mapping
> 
> Hi all, I am trying to extend the ActionMapping Class with my own,
> LaserActionMapping.  I have a List that I want to populate with
> MessageResource keys,.  I have the configuration below, and my class.
> The setter is never being called, does anyone have any suggestions?
> 
>  type="com.llic.web.action.OtherPartiesAction" parameter="method"
> input="newBusiness/OtherPartiesTab.jsp" name="otherPartiesForm"
> scope="request" validate="true"
> className="com.llic.web.action.LaserActionMapping" >
>  value="annuity.button.next"/>
>  value="annuity.button.previous"/>
>  value="annuity.defaultmethod"/>
>  value="annuity.reloadmethod"/>
> 
>  path="newBusiness/OtherPartiesTab.jsp"/>
>  path="newBusiness/OtherPartiesTab.jsp"/>
>  path="newBusiness/OtherPartiesTab.jsp"/>
>  path="newBusiness/OtherPartiesTab.jsp"/>
>  path="newBusiness/OtherPartiesTab.jsp"/>
>  path="newBusiness/OtherPartiesTab.jsp"/>
> 
> 
> 
> /*
>  * Created on Feb 8, 2005
>  *
>  */
> package com.llic.web.action;
> 
> import java.util.ArrayList;
> import java.util.List;
> 
> import org.apache.struts.action.ActionMapping;
> 
> /**
>  * @author Todd Nine
>  * This implementation allows for multiple keys to be set.
>  * This will allow us to skip validation on certain mappings.
>  */
> public class LaserActionMapping extends ActionMapping {
> 
> //map of parameters to ignore
> private List ignore;
> 
> /**
>  * Constructor for LaserActionMapping.
>  */
> public LaserActionMapping() {
> super();
> ignore = new ArrayList();
> 
> }
> 
> /**
>  * @param map
>  */
> public void setIgnore(String value) {
> ignore.add(value);
> }
> 
> /**
>  * @return A list of keys to ignore
>  */
> public List getIgnore() {
> return ignore;
> }
> 
> }
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> --
> Notice:  This e-mail message, together with any attachments, contains 
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
> Jersey, USA 08889), and/or its affiliates (which may be known outside the 
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
> Banyu) that may be confidential, proprietary copyrighted and/or legally 
> privileged. It is intended solely for the use of the individual or entity 
> named on this message.  If you are not the intended recipient, and have 
> received this message in error, please notify us immediately by reply e-mail 
> and then delete it from your system.
> --
>

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



RE: [OT-izzy]

2005-02-08 Thread Dahnke, Eric (Company IT)

That's flippin brilliant. Seriously, LOL

> -Original Message-
> From: James Mitchell [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 08, 2005 12:59 PM
> To: Struts Users Mailing List
> Subject: [OT-izzy]
> 
> 
> http://sites.gizoogle.com/?url=http://struts.apache.org
> 
> 
> 
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

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



RE: Extending Action Mapping

2005-02-08 Thread Benedict, Paul C
If your setter (for setIgnore?) does not have the same type as its getter,
it is probably ignored. The JavaBean spec is really strict with its
requirement for properties.

By the way, "LaserActionMapping" is the coolest action classname I've ever
seen. If there was an award for these things, I think you would win :o)

-Original Message-
From: Todd Nine [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 08, 2005 3:20 PM
To: Struts Users Mailing List
Subject: Extending Action Mapping


Hi all, I am trying to extend the ActionMapping Class with my own,
LaserActionMapping.  I have a List that I want to populate with
MessageResource keys,.  I have the configuration below, and my class. 
The setter is never being called, does anyone have any suggestions?





















/*
 * Created on Feb 8, 2005
 *
 */
package com.llic.web.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts.action.ActionMapping;

/**
 * @author Todd Nine
 * This implementation allows for multiple keys to be set.
 * This will allow us to skip validation on certain mappings.
 */
public class LaserActionMapping extends ActionMapping {

//map of parameters to ignore
private List ignore;


/**
 * Constructor for LaserActionMapping.
 */
public LaserActionMapping() {
super();
ignore = new ArrayList();

}

/**
 * @param map
 */
public void setIgnore(String value) {
ignore.add(value);
}

/**
 * @return A list of keys to ignore
 */
public List getIgnore() {
return ignore;
}

}

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




--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Extending Action Mapping

2005-02-08 Thread Todd Nine
Hi all, I am trying to extend the ActionMapping Class with my own,
LaserActionMapping.  I have a List that I want to populate with
MessageResource keys,.  I have the configuration below, and my class. 
The setter is never being called, does anyone have any suggestions?





















/*
 * Created on Feb 8, 2005
 *
 */
package com.llic.web.action;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts.action.ActionMapping;

/**
 * @author Todd Nine
 * This implementation allows for multiple keys to be set.
 * This will allow us to skip validation on certain mappings.
 */
public class LaserActionMapping extends ActionMapping {

//map of parameters to ignore
private List ignore;


/**
 * Constructor for LaserActionMapping.
 */
public LaserActionMapping() {
super();
ignore = new ArrayList();

}

/**
 * @param map
 */
public void setIgnore(String value) {
ignore.add(value);
}

/**
 * @return A list of keys to ignore
 */
public List getIgnore() {
return ignore;
}

}

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



1.2.6 beta and SAXNotRecognizedException

2005-02-08 Thread Kirby Vandivort
Just grabbed the 1.2.6 beta and put the jar files and tld files in my
app and tried to initialize it, and I'm getting the following
exceptions.  I've also including logging from right before the
exceptions:


2005-02-08 13:11:16,483 DEBUG
org.apache.struts.action.ActionServlet:653   -Initializing module path
'' configuration from '/WEB-INF/conf/struts-config.xml'
2005-02-08 13:11:16,528 DEBUG
org.apache.commons.digester.Digester:1695   -addRuleSet() with no
namespace URI
2005-02-08 13:11:16,555 DEBUG
org.apache.commons.digester.Digester:1659   -register('-//Apache
Software Foundation//DTD Struts Configuration 1.0//EN',
'file://packages/tomcat/jakarta-tomcat-5.0.28/work/Catalina/localhost/app/loader/org/apache/struts/resources/struts-config_1_0.dtd'
2005-02-08 13:11:16,557 DEBUG
org.apache.commons.digester.Digester:1659   -register('-//Apache
Software Foundation//DTD Struts Configuration 1.1//EN',
'file://packages/tomcat/jakarta-tomcat-5.0.28/work/Catalina/localhost/app/loader/org/apache/struts/resources/struts-config_1_1.dtd'
2005-02-08 13:11:16,559 DEBUG
org.apache.commons.digester.Digester:1659   -register('-//Apache
Software Foundation//DTD Struts Configuration 1.2//EN',
'file://packages/tomcat/jakarta-tomcat-5.0.28/work/Catalina/localhost/app/loader/org/apache/struts/resources/struts-config_1_2.dtd'
2005-02-08 13:11:16,564 DEBUG
org.apache.commons.digester.Digester:1659   -register('-//Sun
Microsystems, Inc.//DTD Web Application 2.2//EN',
'file://packages/tomcat/jakarta-tomcat-5.0.28/work/Catalina/localhost/app/loader/org/apache/struts/resources/web-app_2_2.dtd'
2005-02-08 13:11:16,566 DEBUG
org.apache.commons.digester.Digester:1659   -register('-//Sun
Microsystems, Inc.//DTD Web Application 2.3//EN',
'file://packages/tomcat/jakarta-tomcat-5.0.28/work/Catalina/localhost/app/loader/org/apache/struts/resources/web-app_2_3.dtd'
2005-02-08 13:11:16,591 ERROR org.apache.commons.digester.Digester:686
  -Digester.getParser:
org.xml.sax.SAXNotRecognizedException: Feature:
http://apache.org/xml/features/validation/dynamic
   at org.apache.crimson.parser.XMLReaderImpl.setFeature(XMLReaderImpl.java:219)
   at org.apache.crimson.jaxp.SAXParserImpl.setFeatures(SAXParserImpl.java:150)
.
.
.
2005-02-08 13:11:17,529 ERROR
org.apache.struts.action.ActionServlet:362   -Unable to initialize
Struts ActionServlet due to an unexpected exception or error thrown,
so marking the servlet as unavailable.  Most likely, this is due to an
incorrect or missing library dependency.
java.lang.NullPointerException
   at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)







I've looked around on the web and can't find anything obvious.  I'm
doing validation in the webapp, but I'm not sure it is even getting to
the point where it is looking at any of my own code.  Any suggestions?

Thanks,

-- 

Kirby Vandivort

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



Connecting buttons to go to next pages.-Help!

2005-02-08 Thread Sab
I have one action defined in struts config file .



Name="itemsearchForm"
Scope="session"
type="com.my.ItemSearchAction"> 

I have defined in global forward the 



I have a tiles definition which takes me to 
Itemsearch.jsp

This jsp has 2 buttons.-Export and Cancel.
When I click on Export it takes me to another page called itemlist(which
again has 3 more buttons) page. When I click cancel it takes me to main
page .

How to connect the buttons to go to the further pages.
Please help!



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



RE: Struts html tag question

2005-02-08 Thread Slattery, Tim - BLS
> How to show a basic struts text box



> and a checkbox?




--
Tim Slattery
[EMAIL PROTECTED]


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



Struts html tag question

2005-02-08 Thread Sab

How to show a basic struts text box and a checkbox?



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



[OT-izzy]

2005-02-08 Thread James Mitchell
http://sites.gizoogle.com/?url=http://struts.apache.org

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

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


Re: Problems with ControllerConfig properties

2005-02-08 Thread Todd Nine
Nevermind, I just realized why its being set.  That's what I get for
trying to use a WSAD gui! ;-)


On Tue, 8 Feb 2005 12:50:59 -0500, Todd Nine <[EMAIL PROTECTED]> wrote:
> Hi all,
>I am trying to extend RequestProcessor as well as ControllerConfig
> and I am running into errors.  For instance, when I use the default
> ControllerConfig, all of the values are initialized to their defaults,
> and no setters are called.  When I extends the processor and the
> config, setters are being called for properties I have not specified!
> For instance, here is my mapping
> 
>  inputForward="false" locale="false"
> className="com.llic.web.config.LaserControllerConfig" nocache="true">
> 
> 
> 
> Obviously setMappingName("login") is executed, but setLocale(false) is
> being executed on the super class ControllerConfig (I know this from
> debugging and setting a breakpoint).  Why is this happening, I am only
> specifiying one property, why is the setter being called?  I am using
> struts version 1.2.4.
> 
> Thanks,
> Todd
>

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



Problems with ControllerConfig properties

2005-02-08 Thread Todd Nine
Hi all,
   I am trying to extend RequestProcessor as well as ControllerConfig
and I am running into errors.  For instance, when I use the default
ControllerConfig, all of the values are initialized to their defaults,
and no setters are called.  When I extends the processor and the
config, setters are being called for properties I have not specified! 
For instance, here is my mapping




   


Obviously setMappingName("login") is executed, but setLocale(false) is
being executed on the super class ControllerConfig (I know this from
debugging and setting a breakpoint).  Why is this happening, I am only
specifiying one property, why is the setter being called?  I am using
struts version 1.2.4.

Thanks,
Todd

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



RE: Application Security

2005-02-08 Thread David G. Friedman
Tim,

Have you also updated your web.xml and Tomcat conifgurations?

-Original Message-
From: Tim Christopher [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 12:05 PM
To: Struts Users Mailing List
Subject: Re: Application Security


Cheers for all your advice.

I've just tried implementing the JDBCRealm, though unfortunaltly it
does not work.  The Log4j error file contains the following:

http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
JAASRealm.java:269 Unexpected error
java.lang.SecurityException: Unable to locate a login configuration
 at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 

To be honest, I'm not really sure what that means...  All I've done so
far is copy a simple example and I've got that error.  Do I need to
add anything to the classpath?

I can post the code I'm using if anything thinks that will help

On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> The forms for container managed security don't have to be plain html - you
> can configure in the web.xml custom "Logon"  and "Logon Error" pages which
> can be jsps, not just plain html. I have a custom tag on each of these
pages
> which writes the fact that a user has arrived at that page to log4j along
> with details from the request (e.g. IP address). Log4j is pretty powerful
in
> how you can configure it to filter that info and where to send it to.
>
> There are tags in the Jakarta Taglibs which you could use to achieve the
> same thing...
>http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
>http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
>
> For example on your "Logon Error Page", you might have something like
> this...
>
> 
> 
>  
>  
> 
>
> Once a user has "logged on", you can get the user name from from the
request
> and then look up the user details wherever they are stored...
>  request.getUserPrincipal().getName()
>
> The actual form elements required are, as you say, plain html - but is
there
> any need for special tags since the action your posting to is fixed?
>
> Niall
>
> - Original Message -
> From: "Tim Christopher" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 08, 2005 2:08 AM
>
> > I've recently discovered that it is not possible to map an action to
> > j_security_check.  Given this situation how is it possible to populate
> > a form bean with user data, or create a log of any failed login
> > attempts (bad username / password) if the container takes control of
> > the entire login process?
> >
> > Looking back at previous posts to the newsgroup I can see that in the
> > past people have just used plain html to produce the j_security_check
> > form.  Is it possible to do this using the  tag, but so
> > that it does not require a Struts action mapping for j_security_check
> > to be present?
> >
> > I was currently intending on using JDBCRealm and the security-filter
> > to control the site's security, though given the above problems I'm
> > starting to think there might be a better way?  Or are these problems
> > everyone has already solved, as surely some form of login system is
> > present in the vast majority of Struts applications.
>
> -
> 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: Application Security

2005-02-08 Thread Tim Christopher
Cheers for all your advice.

I've just tried implementing the JDBCRealm, though unfortunaltly it
does not work.  The Log4j error file contains the following:

http-80-Processor25 ERROR org.apache.catalina.realm.JAASRealm
JAASRealm.java:269 Unexpected error
java.lang.SecurityException: Unable to locate a login configuration 
 at com.sun.security.auth.login.ConfigFile.(ConfigFile.java:97) 
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
 

To be honest, I'm not really sure what that means...  All I've done so
far is copy a simple example and I've got that error.  Do I need to
add anything to the classpath?

I can post the code I'm using if anything thinks that will help

On Tue, 8 Feb 2005 03:06:51 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> The forms for container managed security don't have to be plain html - you
> can configure in the web.xml custom "Logon"  and "Logon Error" pages which
> can be jsps, not just plain html. I have a custom tag on each of these pages
> which writes the fact that a user has arrived at that page to log4j along
> with details from the request (e.g. IP address). Log4j is pretty powerful in
> how you can configure it to filter that info and where to send it to.
> 
> There are tags in the Jakarta Taglibs which you could use to achieve the
> same thing...
>http://jakarta.apache.org/taglibs/doc/log-doc/intro.html
>http://jakarta.apache.org/taglibs/doc/request-doc/intro.html
> 
> For example on your "Logon Error Page", you might have something like
> this...
> 
> 
> 
>  
>  
> 
> 
> Once a user has "logged on", you can get the user name from from the request
> and then look up the user details wherever they are stored...
>  request.getUserPrincipal().getName()
> 
> The actual form elements required are, as you say, plain html - but is there
> any need for special tags since the action your posting to is fixed?
> 
> Niall
> 
> - Original Message -
> From: "Tim Christopher" <[EMAIL PROTECTED]>
> Sent: Tuesday, February 08, 2005 2:08 AM
> 
> > I've recently discovered that it is not possible to map an action to
> > j_security_check.  Given this situation how is it possible to populate
> > a form bean with user data, or create a log of any failed login
> > attempts (bad username / password) if the container takes control of
> > the entire login process?
> >
> > Looking back at previous posts to the newsgroup I can see that in the
> > past people have just used plain html to produce the j_security_check
> > form.  Is it possible to do this using the  tag, but so
> > that it does not require a Struts action mapping for j_security_check
> > to be present?
> >
> > I was currently intending on using JDBCRealm and the security-filter
> > to control the site's security, though given the above problems I'm
> > starting to think there might be a better way?  Or are these problems
> > everyone has already solved, as surely some form of login system is
> > present in the vast majority of Struts applications.
> 
> -
> 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 validator [ client side error when using date validator]

2005-02-08 Thread Saul Qunming Yuan
Off the top of my head, try using: datePatternStrict instead of
datePattern in  in your validation.xml.

Saul


> Hi,
>
> I have configured and used struts validator for my application,
> Server side validation is working perfectly...
>
>  For client side, the required  validator is working fine, but the date
> ( for example) is not working and giving a java script error "
> datePattern" has no properties.
>
>
>
> Please help.
>
>
> Thanx in advance
> Amjad
>
>
> --Snippet from validation.xml-
>property="startDate"
>   depends="date">
>   
>   
>   datePattern
>   dd/MM/
>
> 
>
>
> --- Snippet from validation-rules.xml -- - --- ---
> classname="org.apache.struts.validator.FieldChecks"
>method="validateDate"
>  methodParams="java.lang.Object,
>org.apache.commons.validator.ValidatorAction,
>org.apache.commons.validator.Field,
>org.apache.struts.action.ActionErrors,
>javax.servlet.http.HttpServletRequest"
>   depends=""
>   msg="errors.date"
>jsFunctionName="DateValidations">
>
>  
>  
>
>   
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Struts validator [ client side error when using date validator]

2005-02-08 Thread Amjad I. Shahrour
Hi,

I have configured and used struts validator for my application, 
Server side validation is working perfectly...

 For client side, the required  validator is working fine, but the date
( for example) is not working and giving a java script error "
datePattern" has no properties.



Please help.


Thanx in advance
Amjad


--Snippet from validation.xml-

  
  
datePattern
dd/MM/
   



--- Snippet from validation-rules.xml -- - --- ---
   

 
 

  


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



[ANN] Struts-JSF London Networking BOF VIII / Tuesday / 15th Mar ch 2005 @ 18:45 / Oracle City of London

2005-02-08 Thread Pilgrim, Peter
Dear Reader

I would like to formally announce that The Eighth Struts/JSF 
London Networking BOF is taking place on 15th March 2005 at ``18:45''
at Oracle City of London offices.

The meeting will take place in a room with Audio/Visual facilities
between 7-9 pm. Afterwords members can retire to the nearby 
Red Lion pub for more in depth discussion ...

The address is:
Oracle City Of London
One South Place
London,
England
EC2M 2RB.

Here is some relevant travel information 

By Underground: -

   Moorgate: Take the Moorgate East exit, turn right, one block to South 
Place.
   Bank: Take the Northern line to Moorgate.
   Liverpool Street:Take the Broadgate exit, turn right onto South Place

Map:   http://www.oracle.com/global/uk/corporate/locations/citymap.html


The venue has kindly been organised by Duncan Mills. We all appreciate
this generous gift. Duncan has offered to also set up meal requirements.
Normally this is geared towards buffet and/or sandwiches, but Oracle
could specially request pizzas if you so desire.

So for those of you who can make it to BOF VIII please state your preference
when you confirm your attendance (please CC duncan.mills at oracle dot com ).
[ ] Sandwiches
[ ] Buffet (Snicks and Snacks)
[ ] Pizza

Not a member? No worrys mate, it's free. Just send me an [OT] email 
or surfs up at
http://www.strutslondon.com  or 
http://struts.meetup.com 

--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
10 South Colonnade, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
This message is for the sole use of the intended recipient. If you received
this message in error please delete it and notify us. If this message was
misdirected, CSFB does not waive any confidentiality or privilege. CSFB
retains and monitors electronic communications sent through its network.
Instructions transmitted over this system are not binding on CSFB until they
are confirmed by us. Message transmission is not guaranteed to be secure.
==


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



Re: Problem setting up a basic JSP with actions

2005-02-08 Thread Soaring Eagle
Thanks for the reply. Turns out, that i was facing the class not found
exceptions because somehow, my J2EE container (weblogic) was not
picking up struts.jar from the lib directory or the WAR file. my WAR
file was inside an EAR file. When I placed the struts.jar and other
library jars in the EAR file, all ClassNotFounds disappeared and I got
the right exceptions which led me to resolving the issues. I have
things working correctly now.

Eagle


On Mon, 07 Feb 2005 16:25:41 -0800, Max Cooper <[EMAIL PROTECTED]> wrote:
> className="ui.action.TestAction"
> 
> should be:
> 
> type="ui.action.TestAction"
> 
> -Max
> 
> On Mon, 2005-02-07 at 14:21 -0500, Soaring Eagle wrote:
> > Hello,
> >
> > I have a simple struts-config.xml like below. This keeps throwing
> > wierd class not found exceptions. Here is the struts-config and the
> > exception. I cannot understand whats wrong here. Note that the
> > struts.jar file is in the WEB-INF/lib/ folder inside the WAR file.
> > Now, this may not be a functional struts-config.xml - because 1) I am
> > still learning/prototyping this stuff and that 2) this itself is
> > throwing errors and not allowing me to go forward. The exceptions
> > appear at startup time when actionservlet is trying to start up.
> > Please help!
> >
> > 
> >  > Struts Configuration 1.2//EN"
> > "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> > 
> > 
> > 
> > 
> > 
> >
> >
> > Feb 7, 2005 2:16:33 PM org.apache.commons.digester.Digester startElement
> > SEVERE: Begin event threw error
> > java.lang.NoClassDefFoundError: org/apache/struts/action/Action
> >   at java.lang.ClassLoader.defineClass0(Native Method)
> >   at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> >   at 
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> >   at 
> > weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:476)
> >   at 
> > weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:181)
> >   at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> >   at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
> >   at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> >   at 
> > weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:223)
> >   at 
> > weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
> >   at 
> > org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:119)
> >   at 
> > org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:145)
> >   at 
> > org.apache.struts.config.ActionMappingFactory.createObject(ConfigRuleSet.java:377)
> >   at 
> > org.apache.commons.digester.FactoryCreateRule.begin(FactoryCreateRule.java:389)
> >   at 
> > org.apache.commons.digester.Digester.startElement(Digester.java:1286)
> >   at 
> > weblogic.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
> >   at 
> > weblogic.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:591)
> >   at 
> > weblogic.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:877)
> >   at 
> > weblogic.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:569)
> >   at 
> > weblogic.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:727)
> >   at 
> > weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:759)
> >   at 
> > weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
> >   at 
> > weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
> >   at 
> > weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
> >   at 
> > weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
> >   at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> >   at 
> > weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
> >   at 
> > weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
> >   at 
> > weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:138)
> >   at org.apache.commons.digester.Digester.parse(Digester.java:1572)
> >   at 
> > org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:708)
> >   at 
> > org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:670)
> >   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> >   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> >   at 
> > weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
> >   at 
> > web

Charset

2005-02-08 Thread Markos Charatzas
Hi there,

Although,

1. I have defined a  in struts-config.xml like the following


2. my html templates have the content type set properly
3. my resource files are in the corrent content type

I still get question marks (?) displayed back to the browser :(
Is there any other place I need to set the charset?

Thanks in advance.

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



Re: Session handling in Struts

2005-02-08 Thread Mark Lowe
Are you links being encoded?



or





Mark
On Tue, 08 Feb 2005 15:23:52 +0530, Rajesh <[EMAIL PROTECTED]> wrote:
> Hi:
> 
> I haired that struts by default supports session handling.
> 
> when i tried to disable in cookies in my browser and try to access my
> site which is a shopping site the site is not handling sessions. when
> ever i try to add items to cart, in next page am not getting the session !!!
> 
> is there any way to over come this
> 
> at first when i access my site the url contains Session id but after
> that i am not
> 
> can anybody suggest me ???
> 
> 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]



Re: Antwort: Session handling in Struts

2005-02-08 Thread Rajesh
Bernd:
THANK YOU VERY MUCH Bernd.
I got you now :)
Rajesh

[EMAIL PROTECTED] wrote:
Hi Rajesh,
automatic session handling by URL-rewriting (which will happen if the 
client is not accepting cookies) can only be guaranteed by Struts if you 
use the corresponding struts tag libraries or JSTL Tags in your JSP-Pages 
for hyperlinks and forms.

If you write link to some page no rewriting 
will take place, because the JSP-Interpreter ignores all plain html-code.

If you include the struts-html taglib in your page and 
write link to some page  the 
custom tag html:link will handle the rewriting for you.

Best regards,
Bernd

Rajesh <[EMAIL PROTECTED]>
08.02.2005 10:53
Bitte antworten an "Struts Users Mailing List"
   An: user@struts.apache.org
   Kopie: 
   Thema:  Session handling in Struts

Hi:
I haired that struts by default supports session handling.
when i tried to disable in cookies in my browser and try to access my 
site which is a shopping site the site is not handling sessions. when 
ever i try to add items to cart, in next page am not getting the session 
!!!

is there any way to over come this
at first when i access my site the url contains Session id but after 
that i am not

can anybody suggest me ???
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]


Antwort: Session handling in Struts

2005-02-08 Thread Bernd . Knobloch
Hi Rajesh,

automatic session handling by URL-rewriting (which will happen if the 
client is not accepting cookies) can only be guaranteed by Struts if you 
use the corresponding struts tag libraries or JSTL Tags in your JSP-Pages 
for hyperlinks and forms.

If you write link to some page no rewriting 
will take place, because the JSP-Interpreter ignores all plain html-code.

If you include the struts-html taglib in your page and 
write link to some page  the 
custom tag html:link will handle the rewriting for you.

Best regards,
Bernd




Rajesh <[EMAIL PROTECTED]>
08.02.2005 10:53
Bitte antworten an "Struts Users Mailing List"

 
An: user@struts.apache.org
Kopie: 
Thema:  Session handling in Struts


Hi:

I haired that struts by default supports session handling.

when i tried to disable in cookies in my browser and try to access my 
site which is a shopping site the site is not handling sessions. when 
ever i try to add items to cart, in next page am not getting the session 
!!!

is there any way to over come this

at first when i access my site the url contains Session id but after 
that i am not

can anybody suggest me ???

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]



Session handling in Struts

2005-02-08 Thread Rajesh
Hi:
I haired that struts by default supports session handling.
when i tried to disable in cookies in my browser and try to access my 
site which is a shopping site the site is not handling sessions. when 
ever i try to add items to cart, in next page am not getting the session !!!

is there any way to over come this
at first when i access my site the url contains Session id but after 
that i am not

can anybody suggest me ???
Rajesh
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems using Tiles with Modules

2005-02-08 Thread Christian Hesse
Hi all!

I solved the problem on my own: Because I have to use struts 1.0 and 
contextRelative and module are not available, I have overloaded the Class vor 
the Image-Tag and now it works.

Bye

Christian

"Struts Users Mailing List"  schrieb am 07.02.05 
17:39:47:
> 
> Hi all!
> 
> I have a very big problem with using Tiles with modules.
> 
> I have the following project-Structure:
> /WebContent
> /WebContent/Images
> /WebContent/Layout
> /WebContent/MyModule
> 
> with some parts with modules and some without.
> 
> I am using a central layout.jsp out of the /WebContent/Layout-Directory for 
> the whole project and any JSPs. It contains the header of my pages with a 
> Logo in it done by a -Tag. 
> 
> If I am calling any JSP which is not Module-based, the link is replaced by 
>  
> and is displayed correct. If I am calling a JSP out of e.g. MyModule, it is 
> replaced by 
>  
> and is not displayed, because I do not have any Images-Directory in the 
> "MyModule"-Directory.
> 
> I have the same problem with my external Javascript-File and my CSS-File 
> which are referenced by a -Tag. 
> 
> Does anyone has an solution how I get the correct path to use only one 
> Template-File per Project and one Images-Directory per Project and not one 
> for each Module?
> 
> Muchos Gracias!
> 
> Christian
> 
> __
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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



Re: Struts & Velocity

2005-02-08 Thread Markos Charatzas
Thanks Joe,

Im aware of the list so I will post there, I just thought it was more of a 
Struts related thing :)

Sorry for that.

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