I have an Ebase application that uploads attachments of various types (.docx,pdf,xls).
I want to be able to open these attachments with the associated Windows application through Ebase.
Does anyone have a piece of code that achieves this please?
How to launch the default app for a file from within Ebase
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
- dvanhussel
- Ebase User
- Posts: 161
- Joined: Fri Oct 19, 2007 12:45 pm
- Location: Haarlem, the Netherlands
Hi Neil,
This is indeed the way to do this. In my experience, some browsers need the correct mime-type set for Office 2007(or higher) files (docx, xlsx). In order to let Tomcat provide the correct mimetypes you need to add them:
1) Go to the install location of Tomcat – <install>\conf and open the web.xml file.
2) Add the following lines in the web.xml:
- For docx files:
<mime>
<extension>docx</extension>
<mime>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime>
</mime>
- For xlsx files:
<mime>
<extension>xlsx</extension>
<mime>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime>
</mime>
- For pptx files:
<mime>
<extension>pptx</extension>
<mime>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime>
</mime>
3) Restart Tomcat.
Regards,
David
This is indeed the way to do this. In my experience, some browsers need the correct mime-type set for Office 2007(or higher) files (docx, xlsx). In order to let Tomcat provide the correct mimetypes you need to add them:
1) Go to the install location of Tomcat – <install>\conf and open the web.xml file.
2) Add the following lines in the web.xml:
- For docx files:
<mime>
<extension>docx</extension>
<mime>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime>
</mime>
- For xlsx files:
<mime>
<extension>xlsx</extension>
<mime>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime>
</mime>
- For pptx files:
<mime>
<extension>pptx</extension>
<mime>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime>
</mime>
3) Restart Tomcat.
Regards,
David
0 x
-
- Ebase User
- Posts: 201
- Joined: Fri Dec 20, 2013 1:29 pm
- Location: Dartford Borough Council
- Contact:
Who is online
Users browsing this forum: No registered users and 20 guests