Re: Control/Restrict number of users using the system

2007-02-16 Thread Karsten Voges
I do not know if there is such a possibility within struts, but you can 
restrict the access via your configuration of tomcat. There is a 
parameter for setting a max. connections.
Or you solve it programmatically by saving a variable in you 
servletContext increamenting after each login, but I am not sure if this 
is a good solution.

Cheers,
Karsten.

ruchira schrieb:

hi,

 My problem is that i want to restrict no of user to use application.

 right now our application can be use by any no of user .i want to
restrict no of user for example if i want to restrict 50 user then 51st user
cant be able to use system.
 

 
Thanks and Regards

Ruchira
  


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



Re: Empty request parameters with enctype set to "multipart/form-data"

2007-02-15 Thread Karsten Voges

Thanks a lot. This definitly helped.
Just pasted in the following code into web.xml and the error disappeared:

struts-cleanup
org.apache.struts2.dispatcher.ActionContextCleanUp


struts-cleanup
/*


Strange that it needs this, but good to know that there is a fix for this.

Cheers,
Karsten.


Andrew Stepanenko schrieb:

Hello,

http://www.archivum.info/user@struts.apache.org/2007-02/msg00012.html

Regards,
Andrew Stepanenko


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



Empty request parameters with enctype set to "multipart/form-data"

2007-02-15 Thread Karsten Voges

Hi list,

I downloaded Struts 2.0.5 (beta) and started developing of a small app 
(simple form submit) on Tomcat 5.5.17 (JDK 1.5). Its working quite good 
and I am happy with both the stability and the programming model.


Unfortunately I have a problem with some requests (form submitting) 
sending no request parameters at all (empty enumeration) and setting no 
fields of my actions. This mainly happens the first time the form gets 
submitted and mainly.
When I set the enctype parameter in the s:form with enctype = 
"application/x-www-form-urlencoded" the form gets submitted without a 
problem. All request parameters are set (checked via 
ServletActionContext.getRequest().getParameterNames()), all fields in 
the action are populated.

But to upload files I have to set the enctype to "multipart/form-data" :(

I found the following questions with the same problem, but no solution 
so far:

http://www.junlu.com/msg/309344.html
http://www.archivum.info/user@struts.apache.org/2006-12/msg00622.html

I have not special interceptors in place.
When no parameters are set, the fileinterceptor is not cleaning the tmp 
files, if the request is coming in well, the fileinterceptor is logging 
as well.


Of course I could seperate the rest of the form from the upload, but I 
am not to sure if this would work either.
I copied all the code over from struts2-showcase-2.0.5 regarding the 
fileupload and it is working most of the times, but not 100%.


The strange thing, is that it mainly happens the first time I submit, 
but not the following times, but sometimes it also happens a second or 
third time.
It never happens after it worked once, so after the form submit worked 
once fine it works fine always.


Any help much appreciated.
Thanks,
Karsten.

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