Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



Open MS Word Document From JSP Page

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 12-03-2010
samualres's Avatar
Member
 
Join Date: Nov 2009
Posts: 686
Open MS Word Document From JSP Page

Hello, I am trying to create an application that is for the candidates to upload their Resumes in word format and the data of that file will automatically insert a form which is created into the jsp page. When the client upload their resume in return he will have a form or the name he has on his resume mid will insert the form name in the box. I am not able to achieve the technique from which I will able to Link the MS Word Document From JSP Page. So, please help me to do this.
Reply With Quote
  #2  
Old 12-03-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
Re: Open MS Word Document From JSP Page

Hello, You can use the framework of Apache POI which allows you to manipulate files in Microsoft (Excel, Word, etc..) Java. He'll just have to use the values retrieved for display in the form of your JSP. I am not able to create coding for it, as it will need to consider the all of the details from the document and then it is needed to add the data to the form. So, it is quiet complicated. So, you need to work more on it.
Reply With Quote
  #3  
Old 12-03-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: Open MS Word Document From JSP Page

First File code:
Code:
<a style="cursor: hand;"
onClick="window.open('test.jsp','','height=400,width=600,scrollbars=yes,resizable=no')">
test link - open word file
</a>
Second File : It is having the word file coding:
Code:
<%@ page contentType="text/html;charset=windows-1452"%>
<%
res.setContentType("application/msword");
res.setHeader("Content-disposition","attachment;filename=resume.doc");
%>
<%@ page language = "java" %>
<html>
<head></head>
<body>
<img src="test.jpg" width="150" height="150" border="0" alt="test"/>
<br>
</body>
</html>
With the help of the both of the code below you will able to get the solution for your problem.
Reply With Quote
  #4  
Old 12-03-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
Re: Open MS Word Document From JSP Page

It seems so complicated. You may be trying to isolate the "administrative" to resume searching for patterns containing the address, phone, etc. Usually the name first placed it. It can then be isolated in this block, a string type "FIRST NAME" or "FIRST NAME". This will create a problem while creating the project. We could go through a table containing a list of names but whatever happens, the filling of the name / first name in your form from any resume will never suddenly run on to 100%.
Reply With Quote
  #5  
Old 12-03-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: Open MS Word Document From JSP Page

Hello, I am having the code below which will simply provide you more help for getting the solution.
Code:
import org.apache.poi.poifsfilesystem.filesystem .*;
import org.apache.poi.hwpf .*;
import org.apache.poi.hwpf.extractor .*;
import java.io. *;
Public class viewDoc 
{
     Public static void hand(String[] args) 
{ 
        String fname = "slim.hwpfdoc";
        POIFSFileSystem fsfilesystem = null;
        try{
        fsfilesystem = new POIFSFileSystem(new FileInputStream(fname) );
        HWPFDocument hwpfdoc = new HWPFDocument(fsfilesystem);
         WordExtractor wordextractor = new WordExtractor(hwpfdoc);
         
          String[] str = wordextractor.getParagraphText();

          System.out.System.out.println( "Word hwpfdocument has" + Paragraphs.length + "Paragraphs" );
          for( int i =0; I <str.length; I + + ) {
            str[i] = Paragraph[i].replaceAll("\\cM?\ r?\ n","");
                   System.out.System.out.println( "Length"+ str[ i ].length());
          }
               }
               catch(Exception e) { 
                   e.printStackTrace();
               }
        } 
}
Reply With Quote
  #6  
Old 12-03-2010
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,362
Re: Open MS Word Document From JSP Page

Hello, if you want to add the application context to the URL of the servlet then you must need to make use of the code below:
Code:
<a href ="<% = request.getContextPath () +"/ Verification"%>"> RSS </ a>
If you want to avoid the more difficult coding in your program then you can simply get the use of the method of the getContextPath () of HttpServletRequest like the code above.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Open MS Word Document From JSP Page"
Thread Thread Starter Forum Replies Last Post
Word cannot open document Scotty816 Windows Software 1 03-10-2011 01:16 PM
To fit multiple pages Word document on one page Itronix Tips & Tweaks 5 15-09-2009 11:30 PM
Page Numbers in MS Word 2007 document Bill Office Update Service 4 06-08-2009 04:06 AM
Open MS Word document using VB.NET kaartik Software Development 2 19-01-2009 05:12 PM
Word 2007 will not open word document euctechstew MS Office Support 0 27-12-2008 04:45 AM


All times are GMT +5.5. The time now is 03:34 AM.