Using JSP/Servlet to write Word Document to BLOB

Hi
I need some help pls
When I use a normal class with a main method, it loads the word document into a blob and I can read this 100%.Stunning.
With a JSP/Servlet I cannot get the document out again. The "format" seems to be lost.
Any ideas,help greatly appreciated:
Here is the Main class that works:
package mypackage1;
import java.io.OutputStream;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.Writer;
import java.sql.Connection;
import oracle.jdbc.*;
import oracle.jdbc.OracleResultSet;
import oracle.sql.BLOB;
import org.apache.log4j.Logger;
import Util_Connect.DataBase;
public class TestLOB
//static final Logger logger = Logger.getLogger("test");
public TestLOB()
public static void main(String args[])
TestLOB testLOB = new TestLOB();
testLOB.TestLOBInsert("c:\\my_data\\callcenterpilot.doc");
public void TestLOBInsert(String fileName)
Connection conn = getConnection("wizard");
BLOB blob = null;
try
conn.setAutoCommit(false);
String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
PreparedStatement pstmt = conn.prepareStatement(cmd);
ResultSet rset = pstmt.executeQuery(cmd);
rset.next();
blob = ((OracleResultSet)rset).getBLOB(2);
File binaryFile = new File(fileName);
System.out.println("Document length = " + binaryFile.length());
FileInputStream instream = new FileInputStream(binaryFile);
OutputStream outstream = blob.getBinaryOutputStream();
int size = blob.getBufferSize();
byte[] buffer = new byte[size];
int length = -1;
while ((length = instream.read(buffer)) != -1)
outstream.write(buffer, 0, length);
instream.close();
outstream.close();
conn.commit();
closeConnection(conn);
catch (Exception ex)
System.out.println("Error =- > "+ex.toString());
private Connection getConnection(String dataBase)
Connection conn = null;
try
DriverManager.registerDriver(new OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@oraclu5:1600:dwz110","so_cs","so_cs");
catch (Exception ex)
System.out.println("Error getting conn"+ex.toString());
return conn;
private void closeConnection(Connection conn)
if (conn != null)
try
conn.close();
catch (Exception se)
System.out.println("Error closing connection in get last imei"+se.toString());
Works fine:
Here is the display servlet: Works when main class inserts file
package mypackage1;
import java.io.InputStream;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.Writer;
import java.sql.Connection;
import oracle.jdbc.*;
import oracle.jdbc.OracleResultSet;
import oracle.sql.BLOB;
import org.apache.log4j.Logger;
import Util_Connect.DataBase;
public class DisplayLOB extends HttpServlet
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
static final Logger logger = Logger.getLogger(DisplayLOB.class);
public void init(ServletConfig config) throws ServletException
super.init(config);
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
//response.setContentType(CONTENT_TYPE);
//PrintWriter out = response.getWriter();
Connection conn = null;
PreparedStatement pstmt = null;
try
conn = getConnection("wizard");
//out.println("<html>");
//out.println("<head><title>DisplayLOB</title></head>");
//out.println("<body>");
//out.println("<p>The servlet has received a POST. This is the reply.</p>");
InputStream is=null;
oracle.sql.BLOB blob=null;
response.setContentType("application/msword");
//response.setContentType("audio/mpeg");
OutputStream os = response.getOutputStream();
String term = "1";
String query = "SELECT docdetail FROM testlob WHERE docno = 1";
pstmt = conn.prepareStatement(query);
ResultSet rs = pstmt.executeQuery();
while (rs.next())
blob=((OracleResultSet)rs).getBLOB(1);
is=blob.getBinaryStream();
int pos=0;
int length=0;
byte[] b = new byte[blob.getChunkSize()];
while((length=is.read(b))!= -1)
pos+=length;
os.write(b);
}//try
catch (Exception se)
se.printStackTrace();
finally
try
pstmt.close();
catch (Exception ex)
System.out.println("Error closing pstmt "+ex.toString());
//out.println("</body></html>");
//out.close();
private Connection getConnection(String dataBase)
Connection conn = null;
try
conn = DataBase.getPoolConnection(dataBase);
catch (Exception se)
logger.fatal("Error getting connection: ",se);
return conn;
private void closeConnection(Connection conn)
if (conn != null)
try
conn.close();
catch (Exception se)
logger.error("Error closing connection in get last imei",se);
Here is JSP/Servlet
<%@ page import="org.apache.log4j.*"%>
<%@ page contentType="text/html; charset=ISO-8859-1" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>untitled</title>
<title>Wizard SMS Interface</title>
<link rel='stylesheet' type='text/css' href='main1.css'>
<script language='JavaScript' src='copyright.js'></script>
</head>
<pre>
<%
//HTTP 1.1
response.setHeader("Cache-Control","no-cache");
//HTTP 1.0
response.setHeader("Pragma","no-cache");
//prevents caching at the proxy server
response.setDateHeader ("Expires", 0);
Logger logger = Logger.getLogger("co.za.mtn.wizard.administration.admin01.jsp");
%>
</pre>
<body>
<FORM ACTION="/WizardAdministration/uploadfile"
METHOD="POST"
ENCTYPE="multipart/form-data">
<INPUT TYPE="FILE" NAME="example">
<INPUT TYPE="SUBMIT" NAME="button" VALUE="Upload">
</FORM>
</body>
</html>
<font> <b>Copyright &copy;
<script>
var LMDate = new Date( document.lastModified );
year = LMDate.getYear();
document.write(display(year));
</script>
Mobile Telephone Networks.
<p align="left"><i><b><font face="Georgia, Times New Roman, Times, serif" size="1"></font></b></i></p>
package co.za.mtn.wizard.admin;
import java.io.InputStream;
import java.util.Enumeration;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.io.Writer;
import java.sql.Connection;
import oracle.jdbc.OracleResultSet;
import oracle.sql.BLOB;
import org.apache.log4j.Logger;
import Util_Connect.DataBase;
public class UploadFile extends HttpServlet
private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
//static final Logger logger = Logger.getLogger(UploadFile.class);
public void init(ServletConfig config) throws ServletException
super.init(config);
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
String headerName = null;
Enumeration en = request.getHeaderNames();
try
while ( en.hasMoreElements() )
Object ob = en.nextElement();
headerName = ob.toString();
System.out.println("Value for headerNAme is >"+headerName+"<");
String aaa = request.getHeader(headerName);
System.out.println("Value for aa is >"+aaa+"<");
catch (Exception ex)
System.out.println("Error in extracting request headers"+ex.toString());
Connection conn = getConnection("wizard");
BLOB blob = null;
try
conn.setAutoCommit(false);
String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
PreparedStatement pstmt = conn.prepareStatement(cmd);
ResultSet rset = pstmt.executeQuery(cmd);
rset.next();
blob = ((OracleResultSet)rset).getBLOB(2);
//File binaryFile = new File("h:\\callcenterpilot.doc");
//System.out.println("Document length = " + binaryFile.length());
//FileInputStream instream = new FileInputStream(binaryFile);
response.setHeader("Content-Type","application/vnd.ms-word");
String contentType = request.getContentType();
System.out.println("Content type received in servlet is >"+contentType+"<");
ServletInputStream instream = request.getInputStream();
OutputStream outstream = blob.getBinaryOutputStream();
int size = blob.getBufferSize();
byte[] buffer = new byte[size];
int length = -1;
while ((length = instream.read(buffer)) != -1)
outstream.write(buffer, 0, length);
instream.close();
outstream.close();
conn.commit();
closeConnection(conn);
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
catch (Exception ex)
System.out.println("Error =- > "+ex.toString());
//out.println("</body></html>");
//out.close();
private Connection getConnection(String dataBase)
Connection conn = null;
try
conn = DataBase.getPoolConnection(dataBase);
catch (Exception se)
System.err.println("Error getting connection: "+se.toString());
return conn;
private void closeConnection(Connection conn)
if (conn != null)
try
conn.close();
catch (Exception se)
System.err.println("Error closing connection in get last imei"+se.toString());
This is what the display servlet is showing when the JSP/Servlet insert the document
-----------------------------7d31422224030e
Content-Disposition: form-data; name="example"; filename="H:\(your name) Skills Matrix.doc"
Content-Type: application/msword
�� ࡱ � > ��     � � ���� � � ���������������������
Tks
Andre

hello,
there are multiple documents out there, describing the oracle reports server setup. try doc.oracle.com for documentation.
also it is part of the online-documentation.
you need to install 9iAS enterprise edition. the server is pre-configured and will listen to the url http://yourserver/dev60cgi/rwcgi60.exe
passing only this url you will get a help-screen, describing the syntax.
regards,
the oracle reports team

Similar Messages

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • Upload video by using jsp/servlet

    I'm using jsp/servlet to upload video file but I have a problem.
    This error occurs for preparing SQL statement when I cast OraclePreparedStatement.
    It is " Error : weblogic.jdbc.rmi.SerialPreparedStatement
    at jsp_servlet._upload._jspService(_upload.java:185)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:263)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2390)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:1959)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)"
    Please help me asap.
    Thanks

    You need to use the Oracle jdbc driver. Apparently, the Weblogic JDBC driver is being selected:
    weblogic.jdbc.rmi.SerialPreparedStatement
    The Oracle JDBC classes can be found in <ORACLE_HOME>/jdbc/lib/See <ORACLE_HOME>/jdbc/readme.txt for how to specify the correct class path in the application.
    I would have thought that the oracle JDBC driver would have been selected (if in the classpath) or an exception would be raised if the Oracle JDBC driver was not found.... because the code should include:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    This should load the Oracle jdbc driver and classes, not the weblogic ones. IF the Oracle JDBC drivers are not found, an exception should be raised...

  • File upload and download using jsp/servlets

    How to upload any file to the server using jsp/servlets. . Help me out

    You can also try the Jenkov HTTP Multipart File Upload. It's a servlet filter that is easy to add to your web-project. After adding it, you can access both request parameters and the uploaded files easily. It's more transparent than Apache Commons File Upload. There is sufficient documentation to get you started, and there is a forum if you have any questions.
    Jenkov HTTP Multipart File Upload is available under the Apache license, meaning its free to use.

  • How do i Create charts using JSP/Servlet & Database

    I have to create charts which shows the graph of stock exchange.
    i have a database that keeps the data for creating charts.
    But i did not know how to create charts using jsp-servlet.
    Any Example might help me to go forward.
    Any help will be really appreciated.
    Please Advice me.

    JFreeChart - You can generate the charts then convert them to image formats (PNG and JPEG) all using the JFreeChart API
    http://www.jfree.org/jfreechart/

  • Create login page using jsp, servlet  & Oracle

    hi,
    i need the sample application for creating login page using jsp, servlet & Oracle,can you please post one sample application.
    thanks
    sona

    See
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfstrutsj2eesec.pdf
    Frank

  • Examination system using JSP/SErvlet and MySQL

    Hi
    I am new to JSP /servlet.
    I am designing online examination system using JSP/Servlet and MySQL ,where multiple choice questions would be selected randomly from the database. After completion of the examination user gets the results ,also the results would be stored in the database for the future reference.
    Can anyone guide me for this? If possible give me the code for similar type of application.
    Thanks

    Sounds like you want someone else to do your homework for you, did you not read this:
    "This forum works so much better when you try to program the code yourself, then let us know where it doesn't work. Otherwise you learn very little, and we work a whole lot."
    and this
    "If you want free code, have you tried searching Google for it? You may want to consider looking for survey software. It will give you the question/answer capabilities then all you have to do is find a way to grade the survey (if you will)...
    If you are using Tomcat as your server, which you probably are, there is a jdbc tutorial included in the documentation, that is the fastest way to set up your database.
    As for your random selection, have a look at Math.random(), this is one way to generate random numbers, you will need an algorithm to convert this value (between 0.0 and 1.0) into a form that can be used to select information from your database.

  • Any good books on web application using JSP/servlet?

    Does anyone know good books on how-to build enterprise web application using JSP/servlet? Aside from the book "Head First JSP/Servlet". Development using Netbeans is more preferrable.

    801264 wrote:
    What about the free web server? JBoss or Glassfish or something else? I prefer web/application server that is fully compatible with JEE6 (unlike Tomcat that can't handle EJB). thanksI'm a JBoss user myself, so naturally I would advise that to you if I were ignorant. I'm not however, so in stead I'll tell you to investigate yourself and see which one you prefer. Nobody is going to tell you which one to use as there is no such thing as a 'better' or 'best' server. Just different servers each with different issues.
    And the community edition of JBoss has had many issues in the past (because Red Hat of course wants to advise you to go to the enterprise platform which ain't cheap), but JBoss 5.1 was a rock solid piece of software that I have had zero problems with (after reading the odd forum or two). JBoss 6 builds on top of JBoss 5.1 and provides the full JEE6 web profile; this means it does NOT provide a certified 'full' JEE6 stack yet. This means nothing however as all the services you may need in an enterprise application are already there.
    BTW: for simple servlet programming, don't neglect Apache Tomcat. Its a lightweight server that just works.

  • I have a question for you: Inserting Word document in BLOB column

    Hey Experts,
    I have found a good info and a sample on how to achieve this on
    http://www.sys-con.com/java/source/5-6/code.cfm?Page=76.
    declare
    f_lob bfile;
    b_lob blob;
    begin
    insert into sam_emp(empno,ename,resume)
    values ( 9001, 'Samir',empty_blob() )
    return risumi into b_lob;
    f_lob := bfilename( 'MY_FILES', 'MyResume.doc' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile
    ( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    I have a jsp project and the users ( on the client side)must be
    able to create a word document and send it to the server with an
    uplaod servlet. With another servlet or jsp i want to process
    this word document in BLOB column using JAVA. The sample above
    uses PL/SQL to achieve this. Is there a way i can do this in my
    servlet/jsp to do the same thing?
    Any hints are welcome!

    The option should be visible here: http://support.mozilla.com/en-US/kb/Printing%20a%20web%20page#w_print-window-settings
    Print range section - Lets you specify which pages of the current web page are printed:
    * Select '''All''' to print everything.
    * Select '''Pages''' and enter the range of pages you want to print. For example, selecting "from 1 to 1" prints the first page only.
    * Select '''Selection''' to print only the part the page you've highlighted.
    Does it work for you?

  • No longer able to insert ActiveX controls or use existing ActiveX controls in Word documents

    Using Word 2010 32bit on Windows 7.1 64bit OS.
    I have a document with several ActiveX controls that I use as a template to generate new documents.  This morning I installed the monthly roll-out of Windows/MS Office updates and then rebooted.  After rebooting, when I opened my Word document,
    I could not use the controls. 
    As far as I can tell, the controls are not disabled in security but are actually not recognized.  If I go into Developer Mode and open the Properties from the context menu on one of the ActiveX controls, the Properties dialog opens but shows properties
    for the main document and not for the control.  If I try to drop a new ActiveX control in a blank document, I get the following message from Microsoft Word: "The program used to create this object is Forms.  That program is either not installed
    on your computer or it is not responding.  To edit this object, install Forms or ensure that any dialog boxes in Forms are closed."  I have not been able to find any information on a program called "Forms".  Is this some component
    of Word that has been corrupted?
    I don't think there is any problem with the actual document because I can still open and use it on another machine running Word 2010 (where the latest updates have not been installed).

    Among the monthly updates for March 2015 is a series of updates that should correct the problem. Use Windows Update to get them.
    The relevant updates are:
    Word 2007: http://support.microsoft.com/KB/2956109
    Excel 2007: http://support.microsoft.com/KB/2956103
    PowerPoint 2007: http://support.microsoft.com/KB/2899580
    Word 2010: http://support.microsoft.com/KB/2956139
    Excel 2010: http://support.microsoft.com/KB/2956142
    PowerPoint 2010: http://support.microsoft.com/KB/2920812
    Office 2013: http://support.microsoft.com/kb/2920754
    Word 2013: http://support.microsoft.com/KB/2956163
    PowerPoint 2013: http://support.microsoft.com/kb/2965206
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Import contact from gmail yahoo hotmail aol using  jsp servlet

    hey can any one tell me the code to import contact list from gmail yahoo aol hotmail etc using jsp or servlet

    I guess you should look for these companies' Java APIs. Some of them (not sure if the ones you want) provides soap clients...

  • Determin how many user log on the site using JSP/Servlet?

    Hi all,
    Is there a way to determine how many user log on the site using JSP/Sevlet? I'm running Apache 2.x & Tomcat 4.x
    I'm trying to get a list of user currently log in the site.
    Please help!
    Thanks,
    -JN-

    You could use the HttpSessionBindingListener interface. Every time a user logs into the session put a user object into the session. The user object will implement the HttpSessionBindingListener interface. When the user object is added to a sessiion it recieves an event and it increments a counter. When the session times out or you invalidate the session because the user has logged out the user object will recieve an event and it can then decrement the counter.
    This will at least tell how many active user sessions there are.

  • Uploading External Documents (*.doc, *.pdf, *.html) using JSP, Servlets, JDBC

    I would like to upload external documents to an Oracle 8.16 db without using agents or interMedia.
    Documents can range from *.doc, *.pdf, *.html and so forth. Ive been all over OTN and all I keep finding are examples on uploading Audio, Video or Image data - which is fine.. but damn, can we get a couple "Real World" examples in there?
    Im even looking at iWorkplace which is excellent.. but a little out of my league when it comes to uploading external documents. But that's exactly what Id like to do. The documentation on this issue is very scarce - Please help.
    Any help in this matter would be greatly appreciated.
    Many Thanks in Advance.

    Is anyone having problems loading text files using this routine? I can load a file with this, but even though the table contains a CLOB, the file is uploaded as binary and one only sees a series of question marks when looking at the CLOB. So, basically, the file appears to be converted somehow from text to binary. Any thoughts? I'm using 8.1.6.0.0 on Sun Solaris 2.7. character set in the database is UTF8.
    Thanks.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Rick Post:
    Steps you need to follow are:
    1. Create a table to hold the documents
    CREATE TABLE XML_DOCUMENTS (
    DOCNAME VARCHAR2(200) NOT NULL,
    XMLDOC CLOB,
    TIMESTAMP DATE
    2. Create a directory
    CREATE OR REPLACE DIRECTORY bfile_dir AS /private1/LOB/files;
    3. Grant READ privileges on the directory to the appropriate user
    GRANT READ on bfile_dir to SCOTT;
    4. Create a procedure
    CREATE PROCEDURE insertXmlFile( dir VARCHAR2,
    file VARCHAR2,
    name VARCHAR2 := NULL) IS
    theBFile BFILE;
    theCLob CLOB;
    theDocName VARCHAR2(200) := NVL(name,file);
    BEGIN
    -- (1) Insert a new row into xml_documents with an empty CLOB, and
    -- (2) Retrieve the empty CLOB into a variable with RETURNING..INTO
    INSERT INTO xml_documents(docname,xmldoc) VALUES(theDocName,empty_clob())
    RETURNING xmldoc INTO theCLob;
    -- (3) Get a BFile handle to the external file
    theBFile := BFileName(dir,file);
    -- (4) Open the file
    dbms_lob.fileOpen(theBFile);
    -- (5) Copy the contents of the BFile into the empty CLOB
    dbms_lob.loadFromFile(dest_lob => theCLob,
    src_lob => theBFile,
    amount => dbms_lob.getLength(theBFile));
    -- (6) Close the file and commit
    dbms_lob.fileClose(theBFile);
    COMMIT;
    END;
    5. Execute the procedure
    INSERTXMLFILE('bfile_dir', filename, 'description');
    Good Luck!
    <HR></BLOCKQUOTE>
    null

  • Can I delete a file in my web folder using JSP/servlet?

    I want to delete some of the files in my website. How can I give file path. I have uploaded my website in US. Just by uploading a servlet /jsp I want to delete files in my directory.
    Is it possible to delete files using Servlert/jsp. What path should I give for the file name in jsp/servelet?

    It is possible. You can just specify the absolute file path in a File object and then invoke the delete() method. File file = new File("/path/file.ext");
    file.delete();See the File API [1] for details. Further on I think that you also want to know how to get the absolute file path for the given relative path. If so, it's available by ServletContext#getRealPath() [2]. To get for example the absolute root path, just query the relative root path "/":
    String rootPath = getServletContext().getRealPath("/");[1] http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html
    [2] http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html

  • Sharing data across different webapps using JSP/Servlet

    I have two different web applications running on same WebLogic server say webapp1 and webapp2. Webapp1 has servlet which redirects the user to JSP in webapp2. While redirecting I have to pass one string value to called JSP. I have achieved this by using QueryString as follows:
    response.sendRedirect(ConfigService.getProperty("com.twofactauth.caymanlogin.caymanurl", null)) + "?userName=" + strCaymanUserName);
    but this expoes the value in browser address bar but i don't want to expose the value passed. I am searching the way to pass the value internally without exposing.
    so please tell me other way in which i can pass the value to called JSP without usign QueryString.
    I am using WebLogic 8.1 for deployments. Both applications are deployed on same WebLogic instance.

    I have two different web applications running on same
    WebLogic server say webapp1 and webapp2. Webapp1 has
    servlet which redirects the user to JSP in webapp2.
    While redirecting I have to pass one string value to
    called JSP. I have achieved this by using QueryString
    as follows:
    response.sendRedirect(ConfigService.getProperty("com.t
    wofactauth.caymanlogin.caymanurl", null)) +
    "?userName=" + strCaymanUserName);
    but this expoes the value in browser address bar but
    i don't want to expose the value passed. I am
    searching the way to pass the value internally
    without exposing.
    so please tell me other way in which i can pass the
    value to called JSP without usign QueryString.
    I am using WebLogic 8.1 for deployments. Both
    applications are deployed on same WebLogic instance.I think a big part of the problem is that you want the functionality of a web app to be available to others, but you've locked it up behind a UI.
    I think this is one of the benefits of a service-oriented architecture. You start thinking about the system functionality apart from the UI. Your JSPs become just another client of the services you expose. Anyone can call those services, as long as they can see that service on their network.
    When I've done this I've started with a Spring service interface that is completely separate from the view layer. Once I have that, I can expose it to any other client either with web services (not preferred) or Spring HTTP remoting (preferred due to its simplicity).
    %

Maybe you are looking for

  • Startup problem with Adaptec FireWire/USB drive enclosure?

    I recently acquired a Core Duo 1.66GHz mini. Soon after buying it I noticed that on startup, I get to the gray screen with Apple logo, and it freezes there for about 3-4 minutes before the spinning wheel appears briefly and then OS X starts normally.

  • Offline / Online RT Confussion

    I am having the hardest time with reconecting my footage. This is my workflow: I have capture HDV footage at full resolution. I want to edit at a lower resolution because it takes forever for my HDV footage to render when I apply even the simplest tr

  • REALLY Mysterious Gray Lines on Every Export (pictures)

    I'm working on a video that contains a white background, and the client's background is also pure white. Every export I give him has a gray vertical line showing on the left and right borders of the video. We've narrowed down every possible cause, an

  • 2 color PDF shows 4 color

    We have been using 2/c file for Indesign CS2 document (Magenta & Black). However we were able to findout, select the Output Preview menu in Acrobat and turned off Magenta and Black it shows the rest of the color. InDesign shows by using Seperation Pr

  • Issues with Lightroom downloading

    Is anyone else having issues with the download button for Lightroom 4.0 on the Adobe download page?  Nothing happens.