Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Jason_chen  
#1 Posted : Thursday, August 19, 2004 11:55:00 AM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

I have downloaded a 2.5 demo and tested it. But I meet some problem.

The run environment is Windows 2000 + Tomcat 4.1.24 + MySQL 4.0. I installed the demo and copy the folder Samples/JSP to Tomcat/webapps/ROOT. Then check http://localhost:8080/JSP/index.htm via IE6.0. I can see and select the pictures in local PC. But when I click the Icon send. IE will stop and issue a error message.

So I want to know whether 2.5 can't run in Windows 2000 + Tomcat 4.1.24 + MySQL 4.0 or my setting have any mistake.
Fedor  
#2 Posted : Thursday, August 19, 2004 1:22:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Jason,

The run environment is Windows 2000 + Tomcat 4.1.24 + MySQL 4.0. I installed the demo and copy the folder Samples/JSP to Tomcat/webapps/ROOT. Then check http://localhost:8080/JSP/index.htm via IE6.0. I can see and select the pictures in local PC. But when I click the Icon send. IE will stop and issue a error message.

We have tested our JSP pages on Resin server. Unfortunately JSP doesn't have standard mechanism for file upload, so way Resin has differ upload mechanism than Tomcat.

If you will check in
Google
for Tomcat upload classes you find following one:

http://www.oop-reserch.com/

and some others...

Note we haven't tested it, but we will delpoy Tomcat in our office in the nearest time and then post working samples for it.
Best regards,
Fedor Skvortsov
Jason_chen  
#3 Posted : Thursday, August 19, 2004 6:02:00 PM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

I test 2.5 in Resin-2.1.9+JDK+Win2000 just now. when I send some picture from PC to Server, I find everything seems OK. But finnaly I can't find any uploaded pictures in folder gallery in server. Do I need to make special setting?
Fedor  
#4 Posted : Friday, August 20, 2004 10:32:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Jason,

We will check this problem right after weekends.

BTW, we have got finally Image Uploader to work on Chinese versions of Windows:

View post
Best regards,
Fedor Skvortsov
Jason_chen  
#5 Posted : Sunday, August 22, 2004 12:29:00 PM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

Thanks!

I find there is a setting in Sample JSP Script of 2.5 help documentation.
It said "Make sure that folder /Samples/JSP/Gallery/ has enough permissions. On Windows NT/2000/XP you should grant modify permission to internet user (IUSR_ ). "
I can't understand how to do this setting. Is that setting should be done in server? Could you tell me the detail proces of this setting in Win2000? I think maybe it is the key point of my problem.
Fedor  
#6 Posted : Sunday, August 22, 2004 1:21:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Hello Jason,

It said "Make sure that folder /Samples/JSP/Gallery/ has enough permissions. On Windows NT/2000/XP you should grant modify permission to internet user (IUSR_ ). "
I can't understand how to do this setting. Is that setting should be done in server? Could you tell me the detail proces of this setting in Win2000? I think maybe it is the key point of my problem.


Yes, you should do it on server. Please select in Windows Explorer the folder where you want to upload (Gallery) and right click on it. Then go to on Security tab and give Modify permissions to IUSR_ user.
Best regards,
Fedor Skvortsov
Jason_chen  
#7 Posted : Sunday, August 22, 2004 5:50:00 PM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

Thanks for your prompt response.
I have done the setting as your instruction, but the problem still exist.
Hope you can test this problem (2.5 run in win2000+apache+Resin) as soon as possible. It's very urgent for us.
Fedor  
#8 Posted : Monday, August 23, 2004 11:38:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
Jason,

The reason of problem is that Resin doesn't allow file upload by default. You shouuld enable it via multipart-form parameter.

Code:
<multipart-form enable="true"/>


You should put it either in global (conf/resin.xml) or application (web.xml) configuration file.

For example in global configuration it should be:

Code:
<web-app-default>
    <!--
        other parameters
    -->

    <multipart-form enable="true"/>
</web-app-default>


You can also read more about multipart-form parameter.



Edited by user Monday, December 24, 2007 4:59:03 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Jason_chen  
#9 Posted : Tuesday, August 24, 2004 11:21:00 AM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

I can't find (conf/resin.xml) or application (web.xml) in resin. Now my resin's version number is 2.1.9. please tell me what's your resin's version number. Thanks!
Fedor  
#10 Posted : Tuesday, August 24, 2004 11:53:00 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
We use Resin 3.0.

On our server it is placed at C:\Resin\conf.

BTW, we are working over Tomcat samples now and hope to include it in final 3.0 release.
Best regards,
Fedor Skvortsov
Jason_chen  
#11 Posted : Tuesday, August 24, 2004 3:58:00 PM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

It's work! Thank your very much!

Another little problem, I find the pictures I send to server will replace the former pictures sent last time. So only the updated pictures can be saved. Is there any setting can avoid the problem?
Fedor  
#12 Posted : Tuesday, August 24, 2004 4:03:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
You should edit Upload.jsp to turn off file deleting. Here is code which deletes previous files:

Code:
//First of all, clear data uploaded at previous time.

//Delete source files
File galleryDir = new File(physicalPath);
if (!(galleryDir.exists()))
{
  galleryDir.mkdir();
}
else
{
  String[] galleryDirList = galleryDir.list();
  for (int i = 0; i < galleryDirList.length; i++)
  {
    File file = new File(physicalPath + "/" + galleryDirList[i]);
    if (file.isFile())
    {
      file.delete();
    }
  }
}

//Delete thumbnail files
File thumbnailDir = new File(physicalPath + "/Thumbnails");
if (!(thumbnailDir.exists()))
{
  thumbnailDir.mkdir();
}
else
{
  String[] thumbnailDirList = thumbnailDir.list();
  for (int i = 0; i < thumbnailDirList.length; i++)
  {
    File file = new File(physicalPath + "/Thumbnails/" + thumbnailDirList[i]);
    if (file.isFile())
    {
      file.delete();
    }
  }
}

Edited by user Monday, December 24, 2007 4:59:17 PM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Jason_chen  
#13 Posted : Wednesday, August 25, 2004 1:27:00 PM(UTC)
Jason_chen

Rank: Member

Groups: Member
Joined: 7/4/2004(UTC)
Posts: 16

Dear Fedor,

I want to say thank you very much for your kind help and strong support!
I can run 2.5 in Resin finally.
But unfortunately, I meet another more hard problem! I find my web JSP program can only run in Tomcat 4.1. then I have no way but to run Uploader 2.5 in Tomcat too.
So please inform me if you have any result in testing 2.5 run in Tomcat 4.1. I still need your help!

Best regards,
Jason
Fedor  
#14 Posted : Wednesday, August 25, 2004 1:46:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,481

Thanks: 3 times
Was thanked: 40 time(s) in 39 post(s)
We have tested Image Uploader on Tomcat 5, but i think it should be the same for version 4.1.

The sample for Tomcat 5.0 is included in Image Uploader 3.0 which will be released today.


========================================================
02/14/2008, Fedor
Additional info

You can find additional info about Tomcat configuration here.

========================================================

Edited by user Tuesday, October 28, 2008 7:28:00 AM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.