Jump to content


Check out our Community Blogs

tarek.mostafa

Member Since 04 Nov 2009
Offline Last Active Oct 07 2010 06:01 AM
-----

Topics I've Started

J2EE: Limit File Size or Request Size

27 May 2010 - 04:46 AM

Dear all,

I developed a web application and it is working fine, except for one issue. The application includes uploading files from a JSP to my servlet, and the issue is that i would like to have a limit for the uploaded files on the client side (before actually uploading it).

I investigated alot and found some ways like changing my JSPs to PHPs, which is not feasable for my application. I would also like to add that using the Flash component ("<object>") for uploading is not feasable also at this time. Using ActiveX does not work also (for some security issues in javascript, it can not access the system information, also ActiveX works only on IE).

I would like to add that I have my application running on Oracle application Server, JSPs for displaying the forms, MultiPart Java API for getting the form input values and files to my servlet and everything is developed in JAVA.

I would like some help to solve this problem, either by limiting the file size or the limiting the whole request size sent to the servlet.

Thanks in advance and I really appreciate your help.

How to display an alert with a scroll bar

09 November 2009 - 12:46 AM

Dear all,

How to display an alert message with a scroll bar attached?!!.

If this is not applicable, then how to display a popup message with a scroll bar, which acts completely as an alert message in its behaviour, meaning that the user can not act on the page except when he confirms the alert?!!

Thanks in advance

hi all

04 November 2009 - 06:04 AM

hi all and thanks to the administrators for their warm welcome.

Hope to find this forum helpful

Table locked and session was invalidated

04 November 2009 - 06:00 AM

I have a simple question, I developed a java application, which runs on Oracle application server and Oracle database. This application depends on multiple JSPs on which multiple users can access a single JSP in the same time, some problems occurs due to the excessive usage of this application and I have some questions about them:

1. Is there any danger or disadvantages in connecting to the database using the jdbc directly from the JSP ?!!

2. An error occurs almost once a week (most probably at the point of time when an excessive usage happens). This error stops the users from submitting or accessing the some JSPs. I ran the following query on the DB to find any locked items:

SELECT o.owner, o.object_name, o.object_type, o.last_ddl_time, o.status,l.session_id, l.oracle_username, l.locked_mode
FROM dba_objects o, gv$locked_object l
WHERE o.object_id = l.object_id;

I found that the table I use to select from in the halted JSPs is a result of this query.

In order to solve this problem temporarily, i use the sql developer to add a record to this table and commit, i find that the problem is solved and the halted jsps involved are running.

These are the exceptions that appears in the log files of the application server right after I press commit:

a. java.lang.IllegalStateException: Session was invalidated (all the time)
b. java.sql.SQLException: Closed Connection (some times)

I do not know exactly where to start debugging, since i use synchronization in all of my code. Also I made sure that each user accessing the same JSP has a separate connection.

Thanks in advance

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download