Re: [OT] Tomcat, JAAS and Kerberos

2005-08-12 Thread Wendy Smoak

From: "netsql" <[EMAIL PROTECTED]>
JAAS I think acts a bit like a filter, it just gets called. In your 
web-xml you tell it what url you want secured and somehow map how the 
users see it. Bea site has a good doc on web.xml.


I'm okay with web.xml, it's configuring the Realm that I'm stuck on--  
actually, writing a LoginModule.  and I have been wandering around the JAAS 
tutorials and the Catalina source code for way too long now.  I think I also 
took an accidental side trip into 'JAAS Authorization' which I _don't_ 
need-- just Authentication.


This tutorial might be the key, we'll see... 
http://java.sun.com/j2se/1.5.0/docs/guide/security/jgss/tutorials/AcnAndAzn.html



(or just go JDBC relms... map JDBC to LDAP :-)


If I had JDBC and/or LDAP, I would be done by now.  One day I will work 
somewhere that has normal systems...


Thanks,
Wendy 



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



Using Security Filter with JDBCRealm questions

2005-08-12 Thread C.F. Scheidecker Antunes

Hello all,

This is my attempt on using SecurityFilter + JDBCRealm for 
Authenticating a Struts Application.
If it works, I will post a simple howto to help other folks with the 
same difficulties on my school webpage.
So I appreciate all the input, opinions and help that anyone can give me 
on the following issues as well as

my configuration so far.

For what I can see on the examples that come bundled with SecurityFilter 
2.0 the Catalina Realm can be declared inside

the securityfilter-config.xml.

Hence If I put my database information and use a JDBCRealm it shoud work 
with the database authentication as well.

So if I add the following on my securityfilter-config.xml:

**

Question: Shall I remove  all the  tags from 
my Tomcat server.xml so that they get overriden by this one on the

securityfilter-config.xml? Or will they get overriden no matter what?

Question: Shall I add the Catalina realm adapter on my 
securityfilter-config.xml as well? Say something like the following:


* 
*

I guess this one should be done before the JDBCRealm Realm, correct?


Then specify within the same /WEB-INF/securityfilter-config.xml the 
 tag as follows:


**
   **FORM**
   **Name**
   **
  **/login.jsp**
  **/error.jsp**
   **
 **

Question: What shall I specify on the  tag or shall I leave 
it blank or remove it?


I can then protect my JSPs within the securityfilter-config.xml as follows:

The first one allows users with a Role of a "participant" as well as an 
administrative user with "admin" role to access /participants.jsp.
The second security constraint allows for administrative users only to 
access admin.jsp. Both require SSL by specifing CONFIDENTIAL

on the  user data constraint tag.

*security-constraint>*
   **
 **Participants**
 **/participants.jsp**
   **
   **
 **participant**
   **
   **
 **admin**
   **
   **
 **CONFIDENTIAL**
   **
 **
 
 **

   **
 **Admin**
 **/admin.jsp**
   **
   **
 **admin**
   **
   **
 **CONFIDENTIAL**
   **
 **


Now, regarding the login.jsp. The example on the SecurityFilter uses 
custom Constants from a class org.securityfilter.example.Constants.
This is a class that defines static final String constants, nothing more 
as far as the code shows.

Those are:
LOGIN_FORM_ID. By looking at the class it is a String of value "loginform".
LOGIN_USERNAME_FIELD. It is actually j_username which is what you are 
supposed to use for Container Authentication.

LOGIN_PASSWORD_FIELD = j_password.
LOGIN_REMEMBERME_FIELD = j_rememberme.

Question:
SecurityFilter than expects that you use a login form with the standard 
Container Authentication field names like j_username, j_password. Is 
this correct?


Final question: As far as verifying the user is authorized to access an 
URL based on its security role and profile besides what says in the 
securityfilter-config.xml
shall I use a Servlet Filter to verify the user and then forward he/she 
to a page if he or she does not have access to that URL or JSP page?


Thanks in advance!

C.F.

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



Re: [OT] Tomcat, JAAS and Kerberos

2005-08-12 Thread C.F. Scheidecker Antunes

Wendy,

Check out this article on JAAS with LDAP. I am sure that it might not be 
as hard to use Kerberos. I've seen an example of the userClassNames and 
roleClassNames somewhere this week. Let me see if I find it and I will 
forward it to you.


The article on JAAS is at:
http://www.theserverside.com/articles/article.tss?l=Pramati-JAAS

Wendy Smoak wrote:

As I mentioned earlier today, we've licensed a (Struts-based, so I'm 
not *entirely* off topic) third-party webapp that comes pre-configured 
to do LDAP authentication.  We, of course, do not have LDAP.  We have 
Kerberos. Easy enough, I thought... surely there's a KerberosRealm I 
can configure and plug in.  Apparently not.


I can successfully authenticate with Kerberos at the command line 
using the code in the tutorial:
  
http://java.sun.com/j2se/1.5.0/docs/guide/security/jgss/tutorials/AcnOnly.html 



I can not, however, figure out what I'm supposed to do to fit that 
part into the Catalina JAASRealm, as described here:
  
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JAASRealm 



The first thing it says is "Write your own LoginModule".  
(Frightening... *I* have to talk to the Kerberos service?)  But 
there's already com.sun.security.auth.module.Krb5LoginModule which is 
used in the tutorial, so maybe not.  I have that in 
$CATALINA_HOME/conf/jaas.config with JAVA_OPTS set properly.


And that's about as far as I can get.  When I go to configure 
server.xml, it wants class names for users and roles:

 

Even if I write a couple of classes and fill in the blanks, I don't 
see what's ever going to instantiate them.


What am I missing?  This can't be as hard as I'm making it.

Thanks,
Wendy Smoak


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



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



Re: [OT] Tomcat, JAAS and Kerberos

2005-08-12 Thread netsql

1st answer is I duno.

But...
JAAS I think acts a bit like a filter, it just gets called. In your 
web-xml you tell it what url you want secured and somehow map how the 
users see it. Bea site has a good doc on web.xml.


So I assume that when you get to the secure url, those classes fire and 
see who the users is.


(or just go JDBC relms... map JDBC to LDAP :-)
.V


Wendy Smoak wrote:



Even if I write a couple of classes and fill in the blanks, I don't see 
what's ever going to instantiate them.


What am I missing?  This can't be as hard as I'm making it.

Thanks,
Wendy Smoak



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



[OT] Tomcat, JAAS and Kerberos

2005-08-12 Thread Wendy Smoak
As I mentioned earlier today, we've licensed a (Struts-based, so I'm not 
*entirely* off topic) third-party webapp that comes pre-configured to do 
LDAP authentication.  We, of course, do not have LDAP.  We have Kerberos. 
Easy enough, I thought... surely there's a KerberosRealm I can configure and 
plug in.  Apparently not.


I can successfully authenticate with Kerberos at the command line using the 
code in the tutorial:

  http://java.sun.com/j2se/1.5.0/docs/guide/security/jgss/tutorials/AcnOnly.html

I can not, however, figure out what I'm supposed to do to fit that part into 
the Catalina JAASRealm, as described here:

  http://jakarta.apache.org/tomcat/tomcat-5.0-doc/realm-howto.html#JAASRealm

The first thing it says is "Write your own LoginModule".  (Frightening... 
*I* have to talk to the Kerberos service?)  But there's already 
com.sun.security.auth.module.Krb5LoginModule which is used in the tutorial, 
so maybe not.  I have that in $CATALINA_HOME/conf/jaas.config with JAVA_OPTS 
set properly.


And that's about as far as I can get.  When I go to configure server.xml, it 
wants class names for users and roles:

 

Even if I write a couple of classes and fill in the blanks, I don't see 
what's ever going to instantiate them.


What am I missing?  This can't be as hard as I'm making it.

Thanks,
Wendy Smoak


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



Re: accessing a collection

2005-08-12 Thread Dave Newton

Johnson, Kaerstin wrote:


I have some code that access a collection from the bean using
request.getAttribute(myAttributeName); 


I'd like to access it using the form directly or jstl and then iterate
over it. 


Whats the bets way to do this?
 



 
 


Don't forget the JSP taglib directive and make sure you have the JSTL libs.

Dave



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



accessing a collection

2005-08-12 Thread Johnson, Kaerstin

I have some code that access a collection from the bean using
request.getAttribute(myAttributeName); 

I'd like to access it using the form directly or jstl and then iterate
over it. 

Whats the bets way to do this?



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



Validation Rules method not found

2005-08-12 Thread Doug Thomas
While implementing struts validation for the first time (yup - I'm a
newbie), I received a NoSuchMethodException during runtime. The exact error
on the console log was:

[8/12/05 12:49:19:062 EDT] 0042 Validator E   TRAS0014I: The
following exception was logged java.lang.NoSuchMethodException:
org.apache.struts.validator.FieldChecks.validateRequired(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field, org.apache.struts.action.ActionMessages,
javax.servlet.http.HttpServletRequest)

My validate file contains:


 
  
   
  
  
   
  
 


...and my :

  
   
   
   
   
  

What am I missing?

I'm thinking this is a development system (WebSphere 6.0) configuration
error, rather than a coding error.

Thanks.

Doug Thomas



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



Reload or Update tiles.xml at runtime

2005-08-12 Thread udokrass
Hi,

how can i reload the tiles.xml?
When i touch the web.xml, the whole Webapplication will be reloaded, so the 
tiles.xml will be reloaded!
But this isnt very useable.
How can i reload the tiles.xml without touching the web.xml and with Java-Code?

Thanks for any advice!

Udo Krass
1 Million Singles in Ihrer Nahe. Finden Sie Ihren Traumpartner
bei Deutschlands beliebtester Partnerboerse:
http://singles.freenet.de/index.html?pid=11512


Re: [OT] Struts and XML - Any stories to tell?

2005-08-12 Thread Michael Jouravlev
On 8/12/05, Ted Husted <[EMAIL PROTECTED]> wrote:
> A colleague is looking to add VoiceXML capabilities to their Struts
> consumer-to-business application.
> 
> I don't see any prior references to VoiceXML in the archives, just
> this one aside:
> 
> * http://www.mail-archive.com/user@struts.apache.org/msg30556.html
> 
> I wonder if anyone here has any VoiceXML best practices, war stories,
> or gotchas to share, especially relating to Struts or development
> tools, or the Jakarta Taglibs Reuseable Dialog Components (RDC).

Ted, I can add a little to the link you mentioned.

Several years ago when Struts was young and hip ;) we developed an app
using Struts + Weblogic/EJB (aw, entity beans) + IBM Voice Response
Server (for VoiceXML).

Application has the following features:
* renders regular HTML
* delivers WML output
* delivers voice responses via VoiceXML + voice server (we used IBM
Voiceresponce, but then switched to much smaller and cheaper in-house
VoiceXML browser); gets DTMF input.

We do not use voice recognition or voice generation. We use
pre-recorded voice sequences in sound files, and touch-tone DTMF
input.

For these three categories we have common EJB/business/Struts actions,
but different JSPs. When client hits the application for the first
time, we check "accepts" header and set medium to either WEB, WAP or
IVR. Then startup action forwards to to an actual welcome action
corresponding to the medium.

We have three types of action mappings for each medium, like 
  <-- for html
 <-- for voice xml
 <-- for wap

Each action mapping has its own JSPs which is reasonable since markup
is so different. Each JSP contains links only to actions for its own
medium, so after "welcome" action detects the medium, all interaction
happens within actions and JSPs for a particular medium.

This is a pretty cool application, a lot of stuff there: EJB,
WebLogic, clustering, telephony, sound-processing, WML markup, WML
gateway interaction, VoiceXML markup, VoiceXML browser, ... Yep, this
was a great project.

Michael.

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



Tomcat 5 issue

2005-08-12 Thread Duane Rosengartner
I need to know if Tomcat has a request timeout that can be configured.
Looking into the server.xml, I see timeouts related to database
connections, and session, and something called tcpSelectorTimeout
 
I have a wierd scenario:
Typically, logging massive amounts of data will overburden memory usage
and create OutOfMemory exception in the JVM. We have a situation where
running in DEBUG mode works where ERROR mode does not. This is backwards
to what we are used to seeing. I believe if we up the minutes for our
request timeout, we might be able to alleviate this issue. My hunch is
that queuing the log.write is circumventing the request timeout; by the
time the queue is empty, the objects are built and ready to render the
page. In ERROR mode(log4J), the browser just quits after 2 minutes.
Nothing in the log looks suspicious.
 
Duane


[OT] Struts and XML - Any stories to tell?

2005-08-12 Thread Ted Husted
A colleague is looking to add VoiceXML capabilities to their Struts
consumer-to-business application.

I don't see any prior references to VoiceXML in the archives, just
this one aside:

* http://www.mail-archive.com/user@struts.apache.org/msg30556.html

I wonder if anyone here has any VoiceXML best practices, war stories,
or gotchas to share, especially relating to Struts or development
tools, or the Jakarta Taglibs Reuseable Dialog Components (RDC).

TIA, Ted.

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



Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread Laurie Harper
Do you get the same problem submitting over http instead of https? If so, 
you can use a packet sniffer to see what's actually being submitted to 
figure out what IE's doing wrong. Otherwise you could try writing a filter 
to dump the raw request (the filter would need to keep a copy of the 
request to feed to the rest of the filter chain of course). Or use a 
debugger to step through the multipart handling code in Struts to observe 
what it's reading from the request.


Once you know what the request looks like you should be able to figure out 
if IE is sending bad data or if there's a bug in the request handling 
(which is not likely, but possible).


L.

temp temp wrote:


Yes I have  multipart/form-data in my jsp .

action="batchfileupload.do" method="post" 
enctype="multipart/form-data">






--- Laurie Harper <[EMAIL PROTECTED]> wrote:



What does your  tag look like? Are you sure
you've specified 
method="POST" and enctype="multipart/form-data"?


L.

temp temp wrote:






  I am using jakarta commons fileupload to upload


a


file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
  I configured my server to use https protocol. 


I


tried  to upload a file it worked fine with


netscape


but did not work with internet explorer. I am


using IE


6.0


  Here is exception I get when I try to upload a


file


over https using internet explorer.
  I am using websphere 5.1 common fileupload  1.0



and Internet Explorer 6.0   

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException -


the


request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is


null




org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:


the request doesn't contain a multipart/form-data


or


multipart/mixed stream, content type header is


null


 at




org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)


 at




com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown


Source)

 at




com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown


Source)

 at




org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)


 at




org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)


 at




org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)


 at




org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)


 at




javax.servlet.http.HttpServlet.service(HttpServlet.java:740)


 at




javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


 at




com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)


 at




com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)


 at




com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)


 at




com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)


 at




com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)


 at




com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)


 at




com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)


 at




com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)


 at




com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown


Source)

 at




com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)


 at




com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)


 at




com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)


 at




com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)


 at




com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)


 at




com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)


 at




com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)


 at




com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)


 at




com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)


 at




com.ibm.ws.http.HttpConnection.r

Re: editing rows

2005-08-12 Thread Laurie Harper
Of course, if you're happy to push all the data for each row out to the 
browser in the page. Just include all the data for the row you want to edit 
in the request to edit it and construct your edit page accordingly. You'll 
still need a database hit to save the data, of course.


Bear in mind that since you're loading the rows to display them they may 
well be in level 1 or level 2 cache (i.e. requesting the row for edit may 
not actually require a database hit), depending on your persistence 
technology. In that case, you may be better off sending the row ID and 
querying for it, for consistency with pages where the  amount of data 
involved makes it inpractical to avoid this.


L.

Valiveti, Kalyan (KeyPeople Resources Inc.) wrote:


Laurie,

I am also looking into similar thing. Doesn't that call for an extra
database hit. What if the row contains all the possible values that are
to be displayed on the edit page? Is there a way I can just send the
entire row-object instead of the primary key/id?




-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Friday, August 12, 2005 10:35 AM
To: user@struts.apache.org
Subject: Re: editing rows

Balkan Guler wrote:

There are some tables in database and I have to transfer them to the 
web pages.

Also they can be deleted and edited.
I am using Struts.
I populate a list of objects from tables.
And put this list in a formbean
and list them in a web page as below:

  
   
  
 I want to make all rows editable therefore I am 
thinking of puting a

button(edit) at the end of all rows and if clicked show all details in




text boxes in a new popup.

the question is how can I recognize the clicked row and populate them 
in a new window?



You'll need to include a row ID (preferably the primary key column from
the database, but anything that uniquely identifies the row is fine) as
a property in your form bean to use in the URL the 'edit' link submits.
If your table is already wrapped in a form, you can just add a button
(or an input of type 'submit') on each row, using the row ID as the
request parameter value for the button. If not, you can either add a
wrapping form, add a separate form on each row. Alternatively, use a
link instead of a button, which will work whether you have forms on the
page or not.

L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder,
Zotech Software: http://www.zotechsoftware.com/


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



--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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



RE: Struts Plug-in on Tomcat

2005-08-12 Thread Shabada, Gnaneshwer

Does it matter if I create my WAR file from WSAD environment? My plugin
class just queries the database for a set of results and cache them. Nothing
complex. Atleast if I fail going to the database I should see my log
statements in the log files. Right? See my plugin config code in my
struts-config.xml  and my actual Plug-in class code below. I am not sure if
I am doing anything wrong here. I also have plugins for ValidatorPlugin and
TilesPlugin which work fine. 

Plug in class code:

public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException {

log.info("Initializing state information from persistent
data store");

// Remember our associated configuration and servlet
this.config = config;
this.servlet = servlet;

// get state information
Collection stateList = RegistrationServices.getStateList();


// Make the initialized state list available
servlet.getServletContext().setAttribute(
RegistrationConstants.STATE_KEY,
stateList);

// Put member registration into cache framework during
bootstrapping for fast retrieval
log.info("Getting registration information from persistent
data store and putting it into Cache Framework");

RegistrationServices.putRegistrationIntoCache();

}


struts-config.xml




Gnan




-Original Message-
From: Laurie Harper [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 12:01 PM
To: user@struts.apache.org
Subject: Re: Struts Plug-in on Tomcat


Shabada, Gnaneshwer wrote:
> Is there any chance that Struts Plug-in class wouldn't work on Tomcat
5.5.9
> server? I have a web application where I wrote a Plugin to cache my
results
> prior to the page display. I want to run this plug-in during server
startup.
> I configured my struts-config.xml accordingly. Apparently, the same code
> works on Websphere App sever but not on Tomcat. I cannot see my trace
> statements in the log files? Any help is appreciated.

How is it not working? Struts should load plugins exactly the same 
regardless of the container used, so if your plugin is sensitive to the 
deployment environment it's  probably due to something the plugin is 
doing... (or a difference in configuration between deployments of course).

L.
-- 
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys "R" Us, Inc.

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



Re: valuator newbie

2005-08-12 Thread David McReynolds
My app is throwing a method not found exception. I've run it through
the debugger and verified. The code snippet below is from commons
ValidatorAction. It blows up on the getMethod call.

private void loadValidationMethod() throws ValidatorException {
if (this.validationMethod != null) {
return;
}
 
try {
this.validationMethod =
this.validationClass.getMethod(this.method,
this.parameterClasses);
 
} catch (NoSuchMethodException e) {
throw new ValidatorException(e.getMessage());
}
}


Struts config partial:





















validation.xml complete
   






   


On 8/11/05, Taylor, Kevin <[EMAIL PROTECTED]> wrote:
> Generally the validator errors are converted into ActionErrors and displayed 
> in the JSP with the html:errors tag. This could be handled numerous ways, 
> e.g. in the Action class or ActionForm.
> 
> > Kevin Taylor
> >
> > -Original Message-
> > From: David McReynolds [SMTP:[EMAIL PROTECTED]
> > Sent: Thursday, August 11, 2005 1:45 PM
> > To:   Struts Users Mailing List
> > Subject:  Re: valuator newbie
> >
> > okay. I was under the impression that the user would not have access
> > to the log  files. This exception is the only indication that
> > something went wrong. What needs to happen to get a message back to
> > the user?
> >
> > On 8/11/05, Taylor, Kevin <[EMAIL PROTECTED]> wrote:
> > > This is caused by a "required" field being left empty on the form.
> > >
> > > > Kevin Taylor
> > > >
> > > > -Original Message-
> > > > From: David McReynolds [SMTP:[EMAIL PROTECTED]
> > > > Sent: Thursday, August 11, 2005 12:55 PM
> > > > To:   StrutsUserList
> > > > Subject:  validator newbie
> > > >
> > > > If inherited some code. I'm not sure what its trying to tell me. The
> > > > user is simpley forwarded on to the next page and there is no
> > > > indication of a problem other than this logged exception.
> > > >
> > > > [11 Aug 2005 13:38:42,886] [org.apache.struts.validator.ValidatorForm]
> > > > [ERROR] validateRequired
> > > > org.apache.commons.validator.ValidatorException: validateRequired
> > > > at 
> > > > org.apache.commons.validator.ValidatorAction.loadValidationMethod()V(ValidatorAction.java:627)
> > > > at 
> > > > org.apache.commons.validator.ValidatorAction.executeValidationMethod(Lorg.apache.commons.validator.Field;Ljava.util.Map;L
> > > > org.apache.commons.validator.ValidatorResults;I)Z(ValidatorAction.java:557)
> > > > at 
> > > > org.apache.commons.validator.Field.validateForRule(Lorg.apache.commons.validator.ValidatorAction;Lorg.apache.commons.vali
> > > > dator.ValidatorResults;Ljava.util.Map;Ljava.util.Map;I)Z(Field.java:811)
> > > > at 
> > > > org.apache.commons.validator.Field.validate(Ljava.util.Map;Ljava.util.Map;)Lorg.apache.commons.validator.ValidatorResults
> > > > ;(Field.java:890)
> > > > at 
> > > > org.apache.commons.validator.Form.validate(Ljava.util.Map;Ljava.util.Map;I)Lorg.apache.commons.validator.ValidatorResults
> > > > ;(Form.java:174)
> > > > at 
> > > > org.apache.commons.validator.Validator.validate()Lorg.apache.commons.validator.ValidatorResults;(Validator.java:367)
> > > > at 
> > > > org.apache.struts.validator.ValidatorForm.validate(Lorg.apache.struts.action.ActionMapping;Ljavax.servlet.http.HttpServle
> > > > tRequest;)Lorg.apache.struts.action.ActionErrors;(ValidatorForm.java:112)
> > > > at 
> > > > org.apache.struts.action.RequestProcessor.processValidate(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.Http
> > > > ServletResponse;Lorg.apache.struts.action.ActionForm;Lorg.apache.struts.action.ActionMapping;)Z(RequestProcessor.java:921)
> > > > at 
> > > > org.apache.struts.action.RequestProcessor.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletR
> > > > esponse;)V(RequestProcessor.java:206)
> > > > at 
> > > > org.apache.struts.action.ActionServlet.process(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResp
> > > > onse;)V(ActionServlet.java:1164)
> > > > at 
> > > > org.apache.struts.action.ActionServlet.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletRespo
> > > > nse;)V(ActionServlet.java:415)
> > > > at 
> > > > javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(
> > > > HttpServlet.java:717)
> > > > at 
> > > > javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)

Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread temp temp

Yes I have  multipart/form-data in my jsp .







--- Laurie Harper <[EMAIL PROTECTED]> wrote:

> What does your  tag look like? Are you sure
> you've specified 
> method="POST" and enctype="multipart/form-data"?
> 
> L.
> 
> temp temp wrote:
> 
> > 
> > 
> > 
> > 
> >I am using jakarta commons fileupload to upload
> a
> > file . It worked fine with Internet explorer  and
> > netscape navigator  with http protocol.
> >I configured my server to use https protocol. 
> I
> > tried  to upload a file it worked fine with
> netscape
> > but did not work with internet explorer. I am
> using IE
> > 6.0
> > 
> > 
> >Here is exception I get when I try to upload a
> file
> > over https using internet explorer.
> >I am using websphere 5.1 common fileupload  1.0
> 
> > and Internet Explorer 6.0   
> > 
> > [8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
> > FATAL 2005-08-12 08:05:47,220
> > actions.BatchUploadAction:handleUnknownException -
> the
> > request doesn't contain a multipart/form-data or
> > multipart/mixed stream, content type header is
> null
> > 
> >
>
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
> > the request doesn't contain a multipart/form-data
> or
> > multipart/mixed stream, content type header is
> null
> > 
> >   at
> >
>
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)
> > 
> >   at
> >
>
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
> > Source)
> > 
> >   at
> >
>
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
> > Source)
> > 
> >   at
> >
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
> > 
> >   at
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
> > 
> >   at
> >
>
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
> > 
> >   at
> >
>
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
> > 
> >   at
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > 
> >   at
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
> > 
> >   at
> >
>
com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
> > Source)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
> > 
> >   at
> >
>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
> > 
> >   at
> >
>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)
> > 
> >   at
> >
>
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
> > 
> >   at
> >
>
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
> > 
> > [8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
> > FATAL 2005-08-12 08:05:47,220
> > actions.BatchUploadAction:handleUnknownException -
> the
> > request doesn't contain a multipart/form-data or
> > multipart/mix

Re: Struts Plug-in on Tomcat

2005-08-12 Thread Laurie Harper

Shabada, Gnaneshwer wrote:

Is there any chance that Struts Plug-in class wouldn't work on Tomcat 5.5.9
server? I have a web application where I wrote a Plugin to cache my results
prior to the page display. I want to run this plug-in during server startup.
I configured my struts-config.xml accordingly. Apparently, the same code
works on Websphere App sever but not on Tomcat. I cannot see my trace
statements in the log files? Any help is appreciated.


How is it not working? Struts should load plugins exactly the same 
regardless of the container used, so if your plugin is sensitive to the 
deployment environment it's  probably due to something the plugin is 
doing... (or a difference in configuration between deployments of course).


L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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



Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread Laurie Harper
What does your  tag look like? Are you sure you've specified 
method="POST" and enctype="multipart/form-data"?


L.

temp temp wrote:






   I am using jakarta commons fileupload to upload a
file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
   I configured my server to use https protocol.  I
tried  to upload a file it worked fine with netscape
but did not work with internet explorer. I am using IE
6.0


   Here is exception I get when I try to upload a file
over https using internet explorer.
   I am using websphere 5.1 common fileupload  1.0 
and Internet Explorer 6.0 	


[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)

  at
com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
Source)

  at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)

  at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

  at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)

  at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

  at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

  at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)

  at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)

  at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.p

RE: [OT] : Web App Caching

2005-08-12 Thread Paranj, Bala
I like the CacheFilter of OpenSymphony. That will be good enough for my
needs. Thanks a lot. 

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 12, 2005 11:56 AM
To: Struts Users Mailing List
Subject: Re: [OT] : Web App Caching


Ditto

check it out at  http://www.opensymphony.com/oscache/

Martin-

- Original Message - 
From: "Ed Griebel" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Friday, August 12, 2005 10:42 AM
Subject: Re: [OT] : Web App Caching


I haven't used it in this capacity, but OSCache from opensymphony.com
supports web page caching.

-ed

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> To be more specific I am currenlty looking at the web-tier caching,
> something that will cache the jsp pages. Thanks.
> 
> -Original Message-
> From: Swapnil Patil [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 12, 2005 10:25 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] : Web App Caching
> 
> 
> Hi Paranj,
> 
> You can consider Hsql DB. Its free and has 2-3 modes.
> 
> On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Could someone share their views on the web application caching
> solutions
> > available? Preferably open source :-) The requirement is for a site
> that
> > has a component which is read-only most of the time. The frequency
of
> > update is of the order of many hours.
> >
> > Thanks,
> > Bala Paranj
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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


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


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



Configuration Question "Struts/webserver"

2005-08-12 Thread Scott Purcell
Hello,


I created struts appliction on a local box calling it like so:
http://localhost/unique/welcome.do
and so on. I used all struts:html tags in order to handle the context 
("unique"). Even my images use the . so I could show the 
client.


 


I really do not know what is going on, but all links and images are screwed up.

Here is some of the page source. I am using base href, and maybe that is 
messing me up?




  http://www.theuniquepear.com/jsp/welcome.jsp";>
  Welcome To The Unique Pear
   
Unique Pear




http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


Home  










Anyone been here before?

Thanks
Scott

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



Re: Modularizing struts-config.xml

2005-08-12 Thread Joe Germuska

At 4:41 PM +0100 8/12/05, Lance Semmens wrote:

Is there any way to break up struts-config.xml into multiple xml files?
I'd like to be able to logically group my form and action mappings in
separate files.


Yes, you can use any number of struts-config files; there is a 
servlet init parameter which accepts a comma-separated list.


  config
  
/WEB-INF/struts-config.xml,
/WEB-INF/admin/struts-config.xml,
/WEB-INF/approval/struts-config.xml,
...


We have become very comfortable with a structure like the above which 
partitions the application into packages which are roughly analogous 
to use cases, or small sets of use cases.  the root struts-config.xml 
holds things like plugin definitions and global exception handling, 
then each sub-directoried file holds the related action mappings and 
action forms for that package.


The same sub-directory also contains tiles-definition.xml, 
validation.xml, and spring-config.xml files (we use Spring to inject 
dependencies into our controllers).  (Of course, you have to add the 
pointers to these files manually in a few places; some kind of 
autodiscovery would be nice, but it's not that much work...)


Then we have an analogously structured Java package naming for 
controllers and related code:


foo.project.prefix.webui.admin.*
foo.project.prefix.webui.approval.*

and we strictly use action mapping paths that also match this pattern:

/admin/AdminHome.do
/admin/AdminSubtask.do
/approval/ApprovalHome.do
/approval/SubmitApproval.do

and more of the same for JSPs, etc.  We find that it means that even 
someone completely new to a project can zero in on an area of concern 
extremely efficiently.  I think it's one of the reasons that I don't 
really see Struts as nearly as much "XML Hell" as some detractors do.


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]



Re: editing rows

2005-08-12 Thread Valiveti, Kalyan \(KeyPeople Resources Inc.\)
Laurie,

I am also looking into similar thing. Doesn't that call for an extra
database hit. What if the row contains all the possible values that are
to be displayed on the edit page? Is there a way I can just send the
entire row-object instead of the primary key/id?




-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Friday, August 12, 2005 10:35 AM
To: user@struts.apache.org
Subject: Re: editing rows

Balkan Guler wrote:
> There are some tables in database and I have to transfer them to the 
> web pages.
> Also they can be deleted and edited.
> I am using Struts.
> I populate a list of objects from tables.
> And put this list in a formbean
> and list them in a web page as below:
> 
>   
>
>   
>  I want to make all rows editable therefore I am 
> thinking of puting a
> button(edit) at the end of all rows and if clicked show all details in

> text boxes in a new popup.
> 
> the question is how can I recognize the clicked row and populate them 
> in a new window?

You'll need to include a row ID (preferably the primary key column from
the database, but anything that uniquely identifies the row is fine) as
a property in your form bean to use in the URL the 'edit' link submits.
If your table is already wrapped in a form, you can just add a button
(or an input of type 'submit') on each row, using the row ID as the
request parameter value for the button. If not, you can either add a
wrapping form, add a separate form on each row. Alternatively, use a
link instead of a button, which will work whether you have forms on the
page or not.

L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie Founder,
Zotech Software: http://www.zotechsoftware.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: [OT] : Web App Caching

2005-08-12 Thread Martin Gainty

Ditto

check it out at  http://www.opensymphony.com/oscache/

Martin-

- Original Message - 
From: "Ed Griebel" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Friday, August 12, 2005 10:42 AM
Subject: Re: [OT] : Web App Caching


I haven't used it in this capacity, but OSCache from opensymphony.com
supports web page caching.

-ed

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:

To be more specific I am currenlty looking at the web-tier caching,
something that will cache the jsp pages. Thanks.

-Original Message-
From: Swapnil Patil [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 10:25 AM
To: Struts Users Mailing List
Subject: Re: [OT] : Web App Caching


Hi Paranj,

You can consider Hsql DB. Its free and has 2-3 modes.

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Could someone share their views on the web application caching
solutions
> available? Preferably open source :-) The requirement is for a site
that
> has a component which is read-only most of the time. The frequency of
> update is of the order of many hours.
>
> Thanks,
> Bala Paranj
>
>
>

-
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: JAAS vs JDBRealm

2005-08-12 Thread Wendy Smoak

From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]>


In order to have the same kind of login functionality within Struts, that
is 2 tables for Users and Roles could I just configure JDBCRealm this same
way? Why would I bother using something like JAAS where I have to
configure the JVM as well?


If JDBCRealm works for you, I don't see any reason why you'd want to use
JAASRealm.

I'm looking at a stack of printouts an inch thick-- this is my second foray 
into JAAS.  I escaped the first time by wrapping the request and overriding 
isUserInRole().  Not this time.


We've licensed a (Struts-based!) third-party webapp that only supports LDAP
authentication.  Of course, we don't have LDAP, we have Kerberos... and
quite inexplicably, (to me,) there is no
org.apache.catalina.realm.KerberosRealm.  I can't believe that _no one_ has
needed this yet.

If things don't fall into place soon, expect an [OT] post in a blatant
attempt to catch the eye of the Catalina expert(s) that I know frequent the
list. ;)

--
Wendy Smoak



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



Modularizing struts-config.xml

2005-08-12 Thread Lance Semmens
Is there any way to break up struts-config.xml into multiple xml files?
I'd like to be able to logically group my form and action mappings in
separate files.


Lance Semmens
Software Engineer

Swebtec
12 Hurlingham Business Park
Sulivan Road
London SW6 3DU
Tel: 0207 471 8121
www.swebtec.com   




Re: editing rows

2005-08-12 Thread Laurie Harper

Balkan Guler wrote:
There are some tables in database and I have to transfer them to the web 
pages.

Also they can be deleted and edited.
I am using Struts.
I populate a list of objects from tables.
And put this list in a formbean
and list them in a web page as below:



 
 


I want to make all rows editable therefore I am thinking of puting a 
button(edit) at the end of all rows and if clicked show all details in text 
boxes in a new popup.


the question is how can I recognize the clicked row and populate them in a 
new window?


You'll need to include a row ID (preferably the primary key column from the 
database, but anything that uniquely identifies the row is fine) as a 
property in your form bean to use in the URL the 'edit' link submits. If 
your table is already wrapped in a form, you can just add a button (or an 
input of type 'submit') on each row, using the row ID as the request 
parameter value for the button. If not, you can either add a wrapping form, 
add a separate form on each row. Alternatively, use a link instead of a 
button, which will work whether you have forms on the page or not.


L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/


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



Re: [FRIDAY] Link to "Don't use Struts" ;-)

2005-08-12 Thread Woodchuck
if ppl think struts is xml hell, then they won't like xslt or other
more xml-based technologies.  the amount of xml required in struts is
not the worst.

woodchuck

--- netsql <[EMAIL PROTECTED]> wrote:

> http://jroller.com/page/RickHigh?entry=don_t_use_struts_on1
> 
> I think it funny. Be basicly says use anything but Struts. 
> 
> Anyday now, we will find a good excuse why it's # 1.
> I read someplace: "They chose Struts becuase they already had it,
> otherwise they would have used XYZ. But when we a new project,
> then... "
> 
> Whatever.
> 
> .V
> 
> 
> 
>

> People are conversing... without posting their email or filling up
> their mail box. ~~1123855373800~~
> roomity.com http://roomity.com/launch.jsp No sign up to read or
> search this Rich Internet App
>

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





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



Struts Plug-in on Tomcat

2005-08-12 Thread Shabada, Gnaneshwer

Is there any chance that Struts Plug-in class wouldn't work on Tomcat 5.5.9
server? I have a web application where I wrote a Plugin to cache my results
prior to the page display. I want to run this plug-in during server startup.
I configured my struts-config.xml accordingly. Apparently, the same code
works on Websphere App sever but not on Tomcat. I cannot see my trace
statements in the log files? Any help is appreciated.

Thanks
Gnan

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys "R" Us, Inc.

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



[Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread temp temp





   I am using jakarta commons fileupload to upload a
file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
   I configured my server to use https protocol.  I
tried  to upload a file it worked fine with netscape
but did not work with internet explorer. I am using IE
6.0


   Here is exception I get when I try to upload a file
over https using internet explorer.
   I am using websphere 5.1 common fileupload  1.0 
and Internet Explorer 6.0   

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)

  at
com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
Source)

  at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)

  at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

  at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)

  at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

  at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

  at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)

  at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)

  at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at
javax.serv

Re: [OT] : Web App Caching

2005-08-12 Thread Ed Griebel
I haven't used it in this capacity, but OSCache from opensymphony.com
supports web page caching.

-ed

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> To be more specific I am currenlty looking at the web-tier caching,
> something that will cache the jsp pages. Thanks.
> 
> -Original Message-
> From: Swapnil Patil [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 12, 2005 10:25 AM
> To: Struts Users Mailing List
> Subject: Re: [OT] : Web App Caching
> 
> 
> Hi Paranj,
> 
> You can consider Hsql DB. Its free and has 2-3 modes.
> 
> On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Could someone share their views on the web application caching
> solutions
> > available? Preferably open source :-) The requirement is for a site
> that
> > has a component which is read-only most of the time. The frequency of
> > update is of the order of many hours.
> >
> > Thanks,
> > Bala Paranj
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: [OT] : Web App Caching

2005-08-12 Thread Paranj, Bala
To be more specific I am currenlty looking at the web-tier caching,
something that will cache the jsp pages. Thanks.

-Original Message-
From: Swapnil Patil [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 12, 2005 10:25 AM
To: Struts Users Mailing List
Subject: Re: [OT] : Web App Caching


Hi Paranj,

You can consider Hsql DB. Its free and has 2-3 modes.

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> Could someone share their views on the web application caching
solutions
> available? Preferably open source :-) The requirement is for a site
that
> has a component which is read-only most of the time. The frequency of
> update is of the order of many hours.
> 
> Thanks,
> Bala Paranj
> 
> 
>

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



RE: [OT] : Web App Caching

2005-08-12 Thread Marsh-Bourdon, Christopher
I'd back that up, HSQL is definitely worth a look.  Just ensure that you
choose your mode carefully.

Christopher Marsh-Bourdon
www.marsh-bourdon.com
 

-Original Message-
From: Swapnil Patil [mailto:[EMAIL PROTECTED] 
Sent: 12 August 2005 15:25
To: Struts Users Mailing List
Subject: Re: [OT] : Web App Caching

Hi Paranj,

You can consider Hsql DB. Its free and has 2-3 modes.

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> Could someone share their views on the web application caching 
> solutions available? Preferably open source :-) The requirement is for 
> a site that has a component which is read-only most of the time. The 
> frequency of update is of the order of many hours.
> 
> Thanks,
> Bala Paranj
> 
> 
>



The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient, please
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167



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



Re: [OT] : Web App Caching

2005-08-12 Thread Swapnil Patil
Hi Paranj,

You can consider Hsql DB. Its free and has 2-3 modes.

On 8/12/05, Paranj, Bala <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> Could someone share their views on the web application caching solutions
> available? Preferably open source :-) The requirement is for a site that
> has a component which is read-only most of the time. The frequency of
> update is of the order of many hours.
> 
> Thanks,
> Bala Paranj
> 
> 
>


[OT] : Web App Caching

2005-08-12 Thread Paranj, Bala
Hi,

Could someone share their views on the web application caching solutions
available? Preferably open source :-) The requirement is for a site that
has a component which is read-only most of the time. The frequency of
update is of the order of many hours.

Thanks,
Bala Paranj



[FRIDAY] Link to "Don't use Struts" ;-)

2005-08-12 Thread netsql
http://jroller.com/page/RickHigh?entry=don_t_use_struts_on1

I think it funny. Be basicly says use anything but Struts. 

Anyday now, we will find a good excuse why it's # 1.
I read someplace: "They chose Struts becuase they already had it, otherwise 
they would have used XYZ. But when we a new project, then... "

Whatever.

.V




People are conversing... without posting their email or filling up their mail 
box. ~~1123855373800~~
roomity.com http://roomity.com/launch.jsp No sign up to read or search this 
Rich Internet App



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



RE: Use to write special characters?

2005-08-12 Thread Thai Dang Vu
Oh! Thank you so much. At first, I thought the filter attribute of the bean tag 
is used to filter HTML tags, so I didn't give it a try.

>>> [EMAIL PROTECTED] 8/12/2005 4:57:22 AM >>>
I think that if you do  your
problems will disappear :-).

Cheers,
Fotis

PS: A bit clearer : make sure that you type filter="false" inside your
tag

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 11, 2005 11:34 PM
To: user@struts.apache.org 
Subject: Use  to write special characters?

Hi everybody,

I have a string s whose value is '' (s contains 2 single quotes). I put
a  tag in a javascript segment of a jsp page with the hope
that when this jsp page is displayed I will have something like

var jan = new Array('', 1, '', 2, 3, 4, '');

But in fact what I get is that all single quotes are changed to #39;. So
the result is

var jan = new Array(#39;#39;, 1, #39;#39;, 2, 3, 4, #39;#39;);

How can I overcome this problem?


-
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: Use to write special characters?

2005-08-12 Thread Chatzinikos, Fotis, VF-GR Consultant
I think that if you do  your
problems will disappear :-).

Cheers,
Fotis

PS: A bit clearer : make sure that you type filter="false" inside your
tag

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 11, 2005 11:34 PM
To: user@struts.apache.org
Subject: Use  to write special characters?

Hi everybody,
 
I have a string s whose value is '' (s contains 2 single quotes). I put
a  tag in a javascript segment of a jsp page with the hope
that when this jsp page is displayed I will have something like
 
var jan = new Array('', 1, '', 2, 3, 4, '');
 
But in fact what I get is that all single quotes are changed to #39;. So
the result is
 
var jan = new Array(#39;#39;, 1, #39;#39;, 2, 3, 4, #39;#39;);
 
How can I overcome this problem?


-
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: Limit length of select box value displayed

2005-08-12 Thread Cadariu, Mihai
You could restrict the length of the label at generation time, in the JSP.
Conversely you can use the CSS 'width' property on the SELECT tag to set a
desired width.

However, I don't think Struts can help in this problem.

Mihai


-Original Message-
From: Antony Paul [mailto:[EMAIL PROTECTED] 
Sent: 12 August 2005 10:50
To: Struts Users Mailing List
Subject: Limit length of select box value displayed

Hi,
I want to limit the length of the label value displayed in a
select box. Is it possible to do with Struts. What are the other
options.

I am using Struts 1.2.7.
-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

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


-- 
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 


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



Limit length of select box value displayed

2005-08-12 Thread Antony Paul
Hi,
I want to limit the length of the label value displayed in a
select box. Is it possible to do with Struts. What are the other
options.

I am using Struts 1.2.7.
-- 
rgds
Antony Paul
http://www.geocities.com/antonypaul24/

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



RE: JAAS vs JDBRealm

2005-08-12 Thread Mark Benussi
Definitely go for JDBCRealm if you can. The only thing you may need to
support is login bad username password messages in struts. No idea how you
do that in JDBCRealm.

The JAAS LoginContext isn't properly supported in Tomcat.

-Original Message-
From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] 
Sent: 12 August 2005 00:42
To: Struts Users Mailing List
Subject: JAAS vs JDBRealm

Hello all,

A little question. I've wrote a little web app for school with Servlets. 
In my Eclipse Project I've added a context.xml file in order to 
configure JDBCRealm and it worked perfectly as Tomcat 5.x supports this 
kind of thing, adding a context.xml file inside the META-INF/ subdir.

In order to have the same kind of login functionality within Struts, 
that is 2 tables for Users and Roles could I just configure JDBCRealm 
this same way? Why would I bother using something like JAAS where I have 
to configure the JVM as well?

What are the advantages and disadvantages? JDBCRealm seems much easier 
to me.

Thanks for the input,

C.F.

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