ContentDisposition for httpservletresponse

Hello everyone,
I am using response.setHeader("Content-Disposition", "attachment; filename=betty1.pdf") in my code to open the pdf as an attachment. What should i use in the place of "attachment" in order not to open the pdf?? I don't want to open and view the pdf file.
Thanks you
Edited by: user539616 on Jun 10, 2010 4:20 PM

It seems your problem is not related to heap memory, but when you fix this problem you´ll probably need to take a look at this article.
There must be a problem related to something else in your code. As the name of the exception suggests, try to find where you used an index out of range(such as to an string, to a array, or to a vector).

Similar Messages

  • File Download - 403 problem

    Hi Folks,
    From long time away from here, I am back.
    In my application we are using only ADF Faces. There is a functionality in my application to download some files that have been previously uploaded by any user.
    The problem is that the file is not written in a file system. It is inside database.
    When the user clicks the download button from an af:table, it starts a method from a backing bean that goes to the database and gets the binary code from there.
    It writes the binary array in the response output but since the download has not started by the user the IE 7 and 8 shows the information bar stating that Internet Explorer has blocked this site from download...
    I have read that it is a default behaviour from IE7 and 8 when the user does not click in a link directly pointed to a file in a server.
    I tried to put the site in Trusted Sites.
    The only solution that I found was to enable "Always prompt for downloading". It works but I cannot use this solution since the application is going to run in a big Brazil TV Channel company throughout the country and change it is very difficult.
    I so that the difference between the REQUEST HEADERS is the Transfering-Enconding chunked, but it is related to content-lenght, when it is not specified. I tried to specify content-lenght and it did not work.
    When I click the bar and choose download file option, it redirects to the same page that I was, changing the afrSOMETHINGMode from 0 to 2 and adding the afrWindow to null.
    It gets me a 302, another two other GETs are done witouht success to the context root and at the last one I get the 403.
    Does any body have any light?
    Thanks in advance.

    Hi Mr. Puthanampatti,
    I used your above code for a download button.
    When I click the button the window will arise and we can download the file.
    But after that the button will not become enable.
    Normally when the task is over the button will automatically enabled. Butt here it is not happening and we can click the button only one time without refreshing the page.
    (I assumed you have used res for HttpServletResponse)
    the code I had used is mentioned below. Please tell me what can I do...??
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)externalContext.getResponse();
    File file = new File(dir1, pdffile1);
    BufferedInputStream input = null;
    BufferedOutputStream output = null;
    try {
    input = new BufferedInputStream(new FileInputStream(file), DEFAULT_BUFFER_SIZE);
    response.reset();
    response.setContentType("application/pdf");
    response.setContentLength((int)file.length());
    response.setHeader("Content-disposition", "inline; filename=\"" + pdffile1 + "\"");
    output = new BufferedOutputStream(response.getOutputStream(), 10240);
    byte[] buffer = new byte[10240];
    int length;
    while ((length = input.read(buffer)) > 0) {
    output.write(buffer, 0, length);
    output.flush();
    } finally {
    close(output);
    close(input);
    facesContext.responseComplete();Thanks a lot.
    Dinuka.

  • Help!!! Changing contentType in Servlet Filter

    Hi,
    I am trying to change resrponse.ContentType() to text/xml in a Filter
    but output is still text/html. please tell me where i am going wrong.. it is really urgent!!!
    anything wrong with this my doFilter method goes like this
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
    try{
    HttpServletResponse res = (HttpServletResponse)response;
    HttpServletRequest req = (HttpServletRequest)request;
    res.setContentType("text/xml");
    chain.doFilter(req, res);
    catch(Exception e){
    e.getMessage();

    Maybe the content type is being set by something (eg. in the compiled jsp code) after you're setting it in the filter?
    In order to check/fix this, use the HttpServletResponseWrapper class.
    This class contains a constructor for HttpServletResponse, as well as implementations of all the HttpServletResponse methods that simply pass the call onto the wrapped response object. You use it by making a subclass of it that redefines one or more of these methods.
    In your case, redefine setContentType in a subclass of HttpServletResponseWrapper, then let doFilter pass the original response object wrapped in your HttpServletResponseWrapper when calling chain.doFilter.
    The setContentType methos may be redefined to do nothing, in which case later callers of this method won't accomplish anything. But first, in orser to verify something's calling this method, you may want to just make it log any calls to it, before passing them along to super.

  • How to communicate servlets with windows media player

    I am new to web programming I am developing an application through which a client can play media file.
    I am getting problem in,how to communicate servlet through windows media player.
    I have developed the basic architecture of my application using tiger server,now I want to open media file through windows media player using openURL option(http request).
    Can any body guide me how to build a servlet which can listen this request and how to respond appropriately
    Please Reply.

    Check out the java doc for HttpServletResponse
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html
    Your sevlet will have to set the response contentType to the appropriate mime type
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/mime.asp
    and contentLength to the file size (in bytes), then open the mp3/wma file and write the bytes to the servlet output stream.
    You could also choose to return an asx file (an xml document containing a url of the media file), and windows media player will automatically lookup the mp3/wma file stored on your web server.

  • What does encodeURL do?

    I'm just confused about the actions of encodeURL as far as session tracking. If I use beans to contain session information, and check the bean values in filters in order to gain access to JSP pages...then do I need to use the encodeURL method at all. I was just curious how it works? and what it does?
    Thanks,
    Lior

    encodeURL() ensure that you don't lose track of the session even if the client has disabled cookies. Through URL rewriting, the session is kept track of even if cookies are not enabled. To identify if two requests coming from a to your server are from the same client or diferent, your server sends a session id that the client holds on to (if cookies are enabled). If the client does not support cookies, encodeURL modifies the URL to include an additional parameter for the session. This id is passed back and forth to ensure that the server knows from where a request is coming from.
    In summary, it is always advised to create URLs for forwarding, redirecting and for embedded links by encoding them if you need session tracking.
    See the javadoc for HttpServletResponse for more details.

  • To communicate was with r3

    Hi, a doubt, I have an application in webdynpro of NetWeaver, which reads a file and creates another xls xls with the same information but different format, which is not, is how can I read the xls of origin because it is The r3 and my application reads it from was ... thanks

    Check out the java doc for HttpServletResponse
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html
    Your sevlet will have to set the response contentType to the appropriate mime type
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/mime.asp
    and contentLength to the file size (in bytes), then open the mp3/wma file and write the bytes to the servlet output stream.
    You could also choose to return an asx file (an xml document containing a url of the media file), and windows media player will automatically lookup the mp3/wma file stored on your web server.

  • Generate and disaply excel file as iview in ep6?

    Hello, everybody.
    I built a iView in EP5 that can generate and display excel file on the run-time. I used contecttype in httpservletresponse to set the content type to excel so the browser will see the data as excel.
    But it looks like the setcontenttype for httpservletresponse does not work anymore in EP6, does anybody know how to make the broswer "sees" the data as an excel file in EP6?
    I am using EP6 SP9

    Hi Gary,
    you definitely can set the content type if you call an AbstractPortalComponent and set all things within method doOnNodeReady (search for both terms on SDN forums, you'll find a heap of hints).
    In addition, I don't know if you create "real" Excel data or use the html trick. If you don't know the latter, see Export Portal data to Excel
    Hope it helps
    Detlev

  • How to return a "HttpServletResponse" for generic servlets (please Help me)

    I have a servlet that do a call service to another machine( the service
              can be so different), and I would like to know if there is possible to
              return to the client the "servletresult" in the "httpservletresult" or
              something
              similar("servletresult" is a class of "bea.jolt". and I utilizes for
              conectivity with TUXEDO).
              I am doing the call to the servlet in an application java(via URL and
              parameteres), not in browser.
              I don´t know which are the parameters to return , and i would like to
              manipule these parameters in the client. So, i want don´t use
              "getParameterValues" of "servletresult".
              I would like to return a object java. It is like to say that the result of
              the service call ("servletresult") is passed directly to the
              "httpservletresponse" and not pass every parameter (read by name ) between
              "servletresult" and "httpservletresponse".
              Thanks
              

    I have a servlet that do a call service to another machine( the service
              can be so different), and I would like to know if there is possible to
              return to the client the "servletresult" in the "httpservletresult" or
              something
              similar("servletresult" is a class of "bea.jolt". and I utilizes for
              conectivity with TUXEDO).
              I am doing the call to the servlet in an application java(via URL and
              parameteres), not in browser.
              I don´t know which are the parameters to return , and i would like to
              manipule these parameters in the client. So, i want don´t use
              "getParameterValues" of "servletresult".
              I would like to return a object java. It is like to say that the result of
              the service call ("servletresult") is passed directly to the
              "httpservletresponse" and not pass every parameter (read by name ) between
              "servletresult" and "httpservletresponse".
              Thanks
              

  • How to return a httpservletresponse for generic servlets II

    I have a servlet that do a call service to another machine( the service
              can be so different), and I would like to know if there is possible to
              return the "servletresult" in the "httpservletresult" or somethiing
              similar,because
              I don´t know which are the parameters to return , and i would like to
              manipule these parameters in the client. So, i want don´t use
              "getParameterValues" of "servletresult".
              I would like to return a object java. It is like to say that the result of
              the service call ("servletresult") is passed directly to the
              "httpservletresponse" and not pass every parameter (read by name ) between
              "servletresult" and "httpservletresponse".
              Thanks
              

    I am not sure if I am answering your question fully but here goes:
              I have a pack of utilities that I use for handling servlet requests.
              One of them helps to transform an HTTPRequest object into a HashMap.
              The objective was to make the processing as web-independent as
              possible. So what you get is a generic java object which has all the
              data of the HTTP Request. You can use it any way you want. I am
              attaching the code below. It does the basic job but pls remember that
              it was designed for a slightly different purpose:
              * Converts an HTTPServletRequest object to an equivalent HashMap
              public boolean mapRequest(HttpServletRequest req, Map input)
              try
              Enumeration reqEnum = req.getParameterNames();
              String keystr;
              String valstr;
              while(reqEnum.hasMoreElements())
              keystr = (String)reqEnum.nextElement();
              valstr = req.getParameter(keystr);
              input.put(keystr, valstr);
              return true;
              catch(Exception e)
              return false;
              oscar alarcon wrote:
              >
              > I have a servlet that do a call service to another machine( the service
              > can be so different), and I would like to know if there is possible to
              > return the "servletresult" in the "httpservletresult" or somethiing
              > similar,because
              > I don´t know which are the parameters to return , and i would like to
              > manipule these parameters in the client. So, i want don´t use
              > "getParameterValues" of "servletresult".
              > I would like to return a object java. It is like to say that the result of
              > the service call ("servletresult") is passed directly to the
              > "httpservletresponse" and not pass every parameter (read by name ) between
              > "servletresult" and "httpservletresponse".
              >
              > Thanks
              

  • Unable to generate XLS output for Quoting Module

    We are using XML Publisher to generate Quote report. We need the output in XLS (Excel) format but it generates only PDF.
    We debugged the following files:
    qotSCopOverview.jsp
    qotSCocPrint.jsp
    qotSCopPrint.jsp
    jtfcrmchrome.jsp
    oracle.apps.aso.print.webui.MainCO.class
    We have set DES_FORMAT to XLS instead of PDF, however it is not generating XLS but the output is PDF only.
    We would like to know the exact JAVA/JSP file which calls XML Publisher engine, so that we could directly change the FORMAT parameter.
    Kindly let us know whether it is possible to generate XLS in this way. Your help will be greatly appreciated.
    Thanking you,
    SURESH KUMAR M R

    Finally we found the solution for this problem.
    1. Open qotSCocPrint.jsp and add below line inside <SELECT id="qotOutFrmt" name="qotOutFrmt"> statement. This line should be added after "for" loop.
    <OPTION value="EXCEL">Excel Format</option>
    We can add as many options the XML Publisher supports.
    2. Decompile oracle.apps.aso.print.webui.MainCO.class (Controller).
    Change the below line
    httpservletresponse.setContentType("application/pdf");
    to
    httpservletresponse.setContentType("application/"+quoteOutputFormat.toLowerCase());
    Take a backup of the original file, compile the java in the same directory.
    3. Decompile oracle.apps.aso.print.server.PrintQuoteAMImpl.class and change this line
    Field field = class2.getDeclaredField("OUTPUT_TYPE_PDF");
    to
    String outputFormat="OUTPUT_TYPE"+as[12].trim();
    Field field = class2.getDeclaredField(outputFormat);
    Bounce Apache and generate the Quote output in desired format.

  • Very poor implementation of XMLHttpRequest streaming with Safari for Window

    I hope this post reaches Apple engineers. This is critical for us to resolve this. I am a member of the developer network, so if using incident support is necessary, it can be used. Do not hesitate to contact me with any questions. I have implemented a test to compare XMLHttpRequest streaming performance for different browsers. Safari for Windows 5.0.3 had the worst results compared to Chrome and Firefox. Furthermore, I think this problem was introduced after Safari 3. The test consists of a server pushing messages of about 350 bytes to the browser at a rate of about 300/s. Once server pushes 10,000 messages, it closes the connection and browser opens new one repeating the cycle. There were several problems associated with Safari: 1) Safari could not process much more then 300 messages/s, that is quite low. Chrome had no problem processing 1,000. If, for example, 500 m/s was used, Safari would quickly allocate hundreds of meg of memory and crash. 2) Safari starts with about 64MEG of memory allocated. Once the test page is opened, memory quickly climes to 150MEG and as test progresses to >400MEG. Once the connection closes, it drops to 150MEG again. Chrome's memory did not fluctuate at all staying at 32MEG for the same test. 3) CPU was steadily claiming as test progressed and then dropped as connection was reset, creating CPU spikes. It reached about 50% CPU before connection was closed. Chrome's CPU stayed at about 2% all the time. This is the code: Server. Should be run with the latest Java Tomcat 7. Configure Tomcat to use Http11NioProtocol: package test; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.comet.CometEvent; import org.apache.catalina.comet.CometProcessor; @SuppressWarnings("serial") public class WebFrameworkServletXHRReconnects extends HttpServlet implements CometProcessor { @Override public void event(CometEvent event) throws IOException, ServletException { HttpServletRequest request = event.getHttpServletRequest(); HttpServletResponse response = event.getHttpServletResponse(); if (event.getEventType() == CometEvent.EventType.BEGIN) { System.out.println("Begin for session: " + request.getSession(true).getId() + " " + response.getWriter()); response.setHeader("pragma", "no-cache,no-store"); response.setHeader("cache-control", "no-cache,no-store,max-age=0,max-stale=0"); event.setTimeout(Integer.MAX_VALUE); PrintWriter out = response.getWriter(); SimpleDateFormat formatter = new SimpleDateFormat("mm:ss: "); for (int i = 0; i < 10000; i++) { out.print("{\"messageType\":8448,\"requestId\":"0",\"eventType\":1,\"symbolId\" :[\"BAC.EA\",0],\"fields\":[{\"header\":"0",\"type\":6,\"data\":[3993,2]},{\"hea der\":"55",\"type\":6,\"data\":[1185,2]},{\"header\":54,\"type\":6,\"data\":[321 8,2]},{\"header\":"5",\"type\":6,\"data\":[6617,2]},{\"header\":52,\"type\":4,\" data\":[15]},{\"header\":"12",\"type\":6,\"data\":[1700,2]}]}"); out.flush(); if (i % 10 == 0) { try { //Thread.sleep(60); Thread.sleep(30); } catch (InterruptedException e) { } } if (i % 100 == 0) { System.out.println(formatter.format(new Date()) + i); } } out.close(); event.close(); } else if (event.getEventType() == CometEvent.EventType.ERROR) { event.close(); } else if (event.getEventType() == CometEvent.EventType.END) { event.close(); } } } client: <script type="text/javascript" src="log4js.js">
    </script>
    <script type="text/javascript">
    var api;
    var log = new Log(Log.DEBUG, Log.popupLogger);
    var byteoffset;
    var perocessedMessages;
    function connect() {
    perocessedMessages = 0;
    byteoffset = 0;
    id = 0;
    api = new XMLHttpRequest;
    api.onreadystatechange = onreadystatechange;
    api.onerror = onerror;
    log.debug('connect');
    api.open("GET", "http://localhost/Test/Controller", true);
    api.send("");
    function onreadystatechange() {
    switch (api.readyState) {
    case 3:
    change();
    break;
    case 4:
    disconnect();
    break;
    function change() {
    connected = true;
    var buffer = api.responseText;
    var newdata = buffer.substring(byteoffset);
    byteoffset = buffer.length;
    while (1) {
    var x = newdata.indexOf("<activ>");
    if (x != -1) {
    y = newdata.indexOf("</activ>", x);
    if (y != -1) {
    processMessage(newdata.substring((x + 7), y));
    newdata = newdata.substring(y + 8);
    else {
    break;
    else {
    break;
    byteoffset = buffer.length - newdata.length;
    function processMessage(msg) {
    var objJson = eval('(' + msg + ')');
    perocessedMessages++;
    //if (perocessedMessages % 100 == 0) {
    // log.debug('' + perocessedMessages);
    function disconnect() {
    log.debug('disconnect');
    connect();
    function onerror() {
    log.debug('onerror');
    </script>

    I hope this post reaches Apple engineers. This is critical for us to resolve this. I am a member of the developer network, so if using incident support is necessary, it can be used.
    We're a user-to-user forum, ilyag. So it'd be better for you to use the Apple Bug Reporter if you want to ensure someone from Apple sees your post:
    http://developer.apple.com/bugreporter/

  • Session Time Out For UNLOGGED IN USER During Search -pls help SIR!

    Hi,
    The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
    The problem is that -
    When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
    Then I click on one of the file from within the search result and visit the file.
    Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
    The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
    Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
    package com.mgh.sps.search.web.handler;
    import java.util.Map;
    import java.util.regex.Pattern;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import org.springframework.validation.BindException;
    import org.springframework.validation.Errors;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.SimpleFormController;
    import com.mgh.sps.search.business.facade.Search;
    import com.mgh.sps.common.dto.ResourceDTO;
    import com.mgh.sps.common.util.SessionAttributeKey;
    import com.mgh.sps.common.util.SessionManager;
    import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
    public class SearchResultsController extends SimpleFormController {
    * SearchResults Controller
    * @author Muralikrishna.s
    * @Codedondate DD-MM-YY=26-07-07
    * @Usecase/s associated =UC504
    private static final Logger logger = Logger
    .getLogger(SearchResultsController.class.getName());
    private final static String REG_EXP = "^[A-Za-z0-9]*$";
    private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
    * Spring framework method used to hold reference data
    * @param request
    * HttpServletRequest
    * @param command
    * Object
    * @param arg2
    * Errors
    * @return Map
    * @throws Exception
    @Override
    protected Map referenceData(HttpServletRequest request, Object command,
    Errors errors) throws Exception {
    logger.debug("SearchResultsController.referenceData() method entered:"
    + request + "," + command + "," + errors);
    SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
    FileUsageWebConstants.TAB_SEARCH, request);
    Search search = (Search) super.getWebApplicationContext().getBean(
    "searchfacade");
    ResourceDTO resourceDto = (ResourceDTO) command;
    String[] allValues = new String[7];
    if (null != (String[]) SessionManager.getSessionAttribute(
    SessionAttributeKey.allValues, request)) {
    allValues = (String[]) SessionManager.getSessionAttribute(
    SessionAttributeKey.allValues, request);
    resourceDto.setKeywords(allValues[0]);
    resourceDto.setCountry(allValues[1]);
    resourceDto.setUniversityName(allValues[2]);
    resourceDto.setSubjectArea(allValues[3]);
    resourceDto.setQualification(allValues[4]);
    resourceDto.setYearLevel(allValues[5]);
    resourceDto.setSpecificType(allValues[6]);
    logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
    + resourceDto.getQualification());
    String flag = (String) request.getParameter("id");
    resourceDto.setFlag(flag);
    logger.debug("SearchResultsController.referenceData() method exited:");
    return search.retrieveReferenceData(resourceDto);
    * Spring framework method used to hold OnSubmit
    * @param request
    * HttpServletRequest
    * @param response
    * HttpServletResponse
    * @param command
    * Object
    * @param arg3
    * BindException
    * @return ModelAndView
    * @throws Exception
    @Override
    protected ModelAndView onSubmit(HttpServletRequest request,
    HttpServletResponse response, Object command, BindException errors)
    throws Exception {
    SessionManager.cleanup(request);
    logger.debug("SearchResultsController.onSubmit() method entered:"
    + request + "," + command + "," + response + "," + errors);
    Search search = (Search) super.getWebApplicationContext().getBean(
    "searchfacade");
    Map dynamic = (Map) getServletContext().getAttribute("config");
    ResourceDTO resourceDto = (ResourceDTO) command;
    SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
    request);
    //changed by sreelatha on sep21
    //resourceDto.setKeywords(request.getParameter("keywords"));
    //String key = request.getParameter("keywords");
    //logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
    String keywords = (request.getParameter("keywords"));
    if(null!=keywords) {
    keywords = keywords.trim();
    resourceDto.setKeywords(keywords);
    // changes end
    resourceDto.setUniversityName(request.getParameter("universityName"));
    resourceDto.setSubjectArea(request.getParameter("subjectArea"));
    resourceDto.setCountry(request.getParameter("country"));
    resourceDto.setQualification(request.getParameter("qualification"));
    resourceDto.setYearLevel(request.getParameter("yearLevel"));
    resourceDto.setSpecificType(request.getParameter("specificType"));
    String[] allValues = new String[7];
    //changed by sreelatha on sep21
    //allValues[0] = request.getParameter("keywords");
    allValues[0] = resourceDto.getKeywords();
    //changes end
    allValues[1] = request.getParameter("country");
    allValues[2] = request.getParameter("universityName");
    allValues[3] = request.getParameter("subjectArea");
    allValues[4] = request.getParameter("qualification");
    allValues[5] = request.getParameter("yearLevel");
    allValues[6] = request.getParameter("specificType");
    SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
    allValues, request);
    if(null!=keywords) {
    keywords = keywords.trim();
    String words="";
    for(int i=0;i<keywords.length();i++) {
    String key=String.valueOf(keywords.charAt(i));
    if(key.contains("*")) {
    key = key.replace("*"," ");
    } else if(key.contains("?")) {
    key = key.replace("?"," ");
    } else if(key.contains("[")) {
    key = key.replace("["," ");
    } else if(key.contains("{")) {
    key = key.replace("{"," ");
    } else if(key.contains("(")) {
    key = key.replace("("," ");
    } else if(key.contains(")")) {
    key = key.replace(")"," ");
    } else if(key.contains("+")) {
    key = key.replace("+"," ");
    } else if(key.contains("
    key = key.replace("
    } else if(key.contains(" ")) {
    key = key.replace(" "," ");
    } else if(key.contains("_")) {
    key = key.replace("","");
    } else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
    key = key.replaceAll(key," ");
    words = words + key;
    keywords = words;
    resourceDto.setKeywords(keywords);
    SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
    String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
    String flag1 = request.getParameter("id");
    String status="";
    if (flag1 !=null && flag1.equals("loggedInUser"))
    if(name==null)
    return new ModelAndView();
    if (flag1 !=null && flag1.equals("loggedInUser")){
    status = "redirect:SearchResults.htm?id=loggedInUser";
    }else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
    status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";
    super.setSuccessView(status);
    ModelAndView mav = new ModelAndView(super.getSuccessView());
    logger.debug("SearchResultsController.onSubmit() method exited:");
    return mav;
    }

    Cross-posted in many forums. Don't answer this one.

  • Session Time Out For UNLOGGED USER During Search -pls help

    Hi,
    The problem lies in searchresultscontroller.java/searchcontroller.java file under search/web/handler of an application that supports educational note sharing.
    The problem is that -
    When I search with query strings in different fields(as you will find in the above mentioned java files)..the keywords in resourcedto and get some files as search results.
    Then I click on one of the file from within the search result and visit the file.
    Here if I m logged in as an user, and the session time out is set to 1 minute in the web.xml file of the web folder not the admin folder then when I hit the BACK TO SEARCH button it easily goes back to the previous search result page along with the queries string that I had input previously.
    The problem is that when I m NOT LOGGED in as an user, and I've performed a search with queries and other dropdowns in the search panel, I get the search result page, I visit the file by clicking on one of them but when I hit the BACK TO SEARCH button I don't see the previous search result page from where I had navigated to view the file.
    Please suggest on what changes shall I make in the code so that even if I m not logged in as an user, I get back to the search result page on hitting the BACK TO SEARCH button from the file view page.Sir I m herein pasting the code of the searchresultscontroller.java file, but please feel free to ask for anyother file whose code you might want to see.
    SEARCHRESULTSCONTROLLER.JAVA FILE CONTENT-
    package com.mgh.sps.search.web.handler;
    import java.util.Map;
    import java.util.regex.Pattern;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.log4j.Logger;
    import org.springframework.validation.BindException;
    import org.springframework.validation.Errors;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.SimpleFormController;
    import com.mgh.sps.search.business.facade.Search;
    import com.mgh.sps.common.dto.ResourceDTO;
    import com.mgh.sps.common.util.SessionAttributeKey;
    import com.mgh.sps.common.util.SessionManager;
    import com.mgh.sps.fileusage.web.constants.FileUsageWebConstants;
    public class SearchResultsController extends SimpleFormController {
         * SearchResults Controller
         * @author Muralikrishna.s
         * @Codedondate DD-MM-YY=26-07-07
         * @Usecase/s associated =UC504
         private static final Logger logger = Logger
                   .getLogger(SearchResultsController.class.getName());
         private final static String REG_EXP = "^[A-Za-z0-9]*$";
         private final static Pattern EMAIL_PATTERN_REG = Pattern.compile(REG_EXP);
         * Spring framework method used to hold reference data
         * @param request
         * HttpServletRequest
         * @param command
         * Object
         * @param arg2
         * Errors
         * @return Map
         * @throws Exception
         @Override
         protected Map referenceData(HttpServletRequest request, Object command,
                   Errors errors) throws Exception {
              logger.debug("SearchResultsController.referenceData() method entered:"
                        + request + "," + command + "," + errors);
              SessionManager.setSessionAttribute(SessionAttributeKey.tabIndex,
                        FileUsageWebConstants.TAB_SEARCH, request);
              Search search = (Search) super.getWebApplicationContext().getBean(
                        "searchfacade");
              ResourceDTO resourceDto = (ResourceDTO) command;
              String[] allValues = new String[7];
              if (null != (String[]) SessionManager.getSessionAttribute(
                        SessionAttributeKey.allValues, request)) {
                   allValues = (String[]) SessionManager.getSessionAttribute(
                             SessionAttributeKey.allValues, request);
                   resourceDto.setKeywords(allValues[0]);
                   resourceDto.setCountry(allValues[1]);
                   resourceDto.setUniversityName(allValues[2]);
                   resourceDto.setSubjectArea(allValues[3]);
                   resourceDto.setQualification(allValues[4]);
                   resourceDto.setYearLevel(allValues[5]);
                   resourceDto.setSpecificType(allValues[6]);
              logger.debug("%%%%%%%%%%%%%%%%%qualification%%%%%%%%%%%%%%%"
                        + resourceDto.getQualification());
              String flag = (String) request.getParameter("id");
              resourceDto.setFlag(flag);
              logger.debug("SearchResultsController.referenceData() method exited:");
              return search.retrieveReferenceData(resourceDto);
         * Spring framework method used to hold OnSubmit
         * @param request
         * HttpServletRequest
         * @param response
         * HttpServletResponse
         * @param command
         * Object
         * @param arg3
         * BindException
         * @return ModelAndView
         * @throws Exception
         @Override
         protected ModelAndView onSubmit(HttpServletRequest request,
                   HttpServletResponse response, Object command, BindException errors)
                   throws Exception {
              SessionManager.cleanup(request);
              logger.debug("SearchResultsController.onSubmit() method entered:"
                        + request + "," + command + "," + response + "," + errors);
              Search search = (Search) super.getWebApplicationContext().getBean(
                        "searchfacade");
              Map dynamic = (Map) getServletContext().getAttribute("config");
              ResourceDTO resourceDto = (ResourceDTO) command;
              SessionManager.removeSessionAttribute(SessionAttributeKey.allValues,
                        request);
              //changed by sreelatha on sep21
              //resourceDto.setKeywords(request.getParameter("keywords"));
              //String key = request.getParameter("keywords");
              //logger.debug("&&&&&&&&&&&&& key &&&&&&&&&&&&" + key);
              String keywords = (request.getParameter("keywords"));
              if(null!=keywords) {
                   keywords = keywords.trim();
              resourceDto.setKeywords(keywords);
    //          changes end
              resourceDto.setUniversityName(request.getParameter("universityName"));
              resourceDto.setSubjectArea(request.getParameter("subjectArea"));
              resourceDto.setCountry(request.getParameter("country"));
              resourceDto.setQualification(request.getParameter("qualification"));
              resourceDto.setYearLevel(request.getParameter("yearLevel"));
              resourceDto.setSpecificType(request.getParameter("specificType"));
              String[] allValues = new String[7];
              //changed by sreelatha on sep21
              //allValues[0] = request.getParameter("keywords");
              allValues[0] = resourceDto.getKeywords();
              //changes end
              allValues[1] = request.getParameter("country");
              allValues[2] = request.getParameter("universityName");
              allValues[3] = request.getParameter("subjectArea");
              allValues[4] = request.getParameter("qualification");
              allValues[5] = request.getParameter("yearLevel");
              allValues[6] = request.getParameter("specificType");
              SessionManager.setSessionAttribute(SessionAttributeKey.allValues,
                        allValues, request);
                   if(null!=keywords) {
                   keywords = keywords.trim();
                   String words="";
                   for(int i=0;i<keywords.length();i++) {               
                        String key=String.valueOf(keywords.charAt(i));
                        if(key.contains("*")) {
                                  key = key.replace("*"," ");
                             } else if(key.contains("?")) {
                                  key = key.replace("?"," ");
                             } else if(key.contains("[")) {
                                  key = key.replace("["," ");
                             } else if(key.contains("{")) {
                                  key = key.replace("{"," ");
                             } else if(key.contains("(")) {
                                  key = key.replace("("," ");
                             } else if(key.contains(")")) {
                                  key = key.replace(")"," ");
                             } else if(key.contains("+")) {
                                  key = key.replace("+"," ");
                             } else if(key.contains("\\")) {
                                  key = key.replace("\\"," ");
                             } else if(key.contains(" ")) {
                                  key = key.replace(" "," ");
                             } else if(key.contains("_")) {
                                  key = key.replace("_","_");
                             } else if(!EMAIL_PATTERN_REG.matcher(key).matches()) {
                                  key = key.replaceAll(key," ");
                        words = words + key;
                   keywords = words;
                   resourceDto.setKeywords(keywords);
              SessionManager.setSessionAttribute(SessionAttributeKey.test, search.setInputValues(resourceDto, dynamic), request);
              String name = (String) SessionManager.getSessionAttribute(SessionAttributeKey.tempName, request);
              String flag1 = request.getParameter("id");
              String status="";
              if (flag1 !=null && flag1.equals("loggedInUser"))
              if(name==null)
                        return new ModelAndView();
              if (flag1 !=null && flag1.equals("loggedInUser")){
                   status = "redirect:SearchResults.htm?id=loggedInUser";
              }else if(flag1 !=null && flag1.equals("nonLoggedInUser"))
                   status = "redirect:SearchResultsnlu.htm?id=nonLoggedInUser";     
              super.setSuccessView(status);
              ModelAndView mav = new ModelAndView(super.getSuccessView());
              logger.debug("SearchResultsController.onSubmit() method exited:");
              return mav;
    }

    Cross-posted in many forums. Don't answer this one.

  • Unable to run Web App for the 2nd Time

    Hi,
    I am using Weblogic 8.1 sp5 as my deploying platform. Using the official tutorials, I am able to export my JSC2 web app into a WAR file that is deployable on my Weblogic server.
    Upon running the application, it works perfectly. However, upon closing my browser and then restarting the browser, running the web app again yields exceptions, please refer to the bottom.
    What am I doing wrong? I am suspecting the web-app wasn't detroyed properly when another instances of it is started...
    Please advise.
    Adams
    Error 500--Internal Server Error
    com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(Ljavax/faces/context/FacesContext;)V(ViewHandlerImpl.java:601)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:316)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at com.sun.rave.web.ui.util.UploadFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(UploadFilter.java:194)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:326)
         at weblogic.servlet.jsp.PageContextImpl.forward(Ljava/lang/String;)V(PageContextImpl.java:150)
         at jsp_servlet.__jscreator_index._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__jscreator_index.java:122)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava/lang/Object;(WebAppServletContext.java:6985)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(Lweblogic/servlet/internal/ServletRequestImpl;Lweblogic/servlet/internal/ServletResponseImpl;)V(WebAppServletContext.java:3892)
         at weblogic.servlet.internal.ServletRequestImpl.execute(Lweblogic/kernel/ExecuteThread;)V(ServletRequestImpl.java:2766)
         at weblogic.kernel.ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run()V(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    Caused by: java.lang.RuntimeException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:343)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(ServletStubImpl.java:348)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(RequestDispatcherImpl.java:328)
         at com.sun.faces.context.ExternalContextImpl.dispatch(Ljava/lang/String;)V(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:130)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIViewRoot;)V(ViewHandlerImpl.java:311)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(Ljavax/faces/context/FacesContext;)V(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(Ljavax/faces/event/PhaseId;Lcom/sun/faces/lifecycle/Phase;Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.render(Ljavax/faces/context/FacesContext;)V(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FacesServlet.java:198)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Invalid parameter binding(s).
         at com.microsoft.jdbc.base.BaseExceptions.createException(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BaseExceptions.getException(ILjava/lang/String;)Ljava/sql/SQLException;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters(Lcom/microsoft/jdbc/base/BaseParameters;)V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.validateParameters()V(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.preImplExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.commonExecute()V(Unknown Source)
         at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal()Ljava/sql/ResultSet;(Unknown Source)
         at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery()Ljava/sql/ResultSet;(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery()Ljava/sql/ResultSet;(PreparedStatement.java:124)
         at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(Ljavax/sql/RowSetInternal;)V(CachedRowSetXReader.java:193)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute(Ljava/sql/Connection;)V(CachedRowSetXImpl.java:950)
         at com.sun.sql.rowset.CachedRowSetXImpl.execute()V(CachedRowSetXImpl.java:1410)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute()V(CachedRowSetDataProvider.java:1219)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Lcom/sun/data/provider/RowKey;)V(CachedRowSetDataProvider.java:329)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(I)Z(CachedRowSetDataProvider.java:300)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount()I(CachedRowSetDataProvider.java:624)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:806)
         at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys()[Lcom/sun/data/provider/RowKey;(TableRowGroup.java:429)
         at com.sun.rave.web.ui.component.TableRowGroup.getRowCount()I(TableRowGroup.java:749)
         at com.sun.rave.web.ui.component.Table.getRowCount()I(Table.java:307)
         at com.sun.rave.web.ui.component.Table.getTableActionsTop()Ljavax/faces/component/UIComponent;(Table.java:539)
         at com.sun.rave.web.ui.renderer.TableRenderer.renderActionsTop(Ljavax/faces/context/FacesContext;Lcom/sun/rave/web/ui/component/Table;Ljavax/faces/context/ResponseWriter;)V(TableRenderer.java:257)
         at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(TableRenderer.java:124)
         at javax.faces.component.UIComponentBase.encodeBegin(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:683)
         at com.sun.rave.web.ui.component.Table.encodeBegin(Ljavax/faces/context/FacesContext;)V(Table.java:811)
         at com.sun.rave.web.ui.util.RenderingUtilities.renderComponent(Ljavax/faces/component/UIComponent;Ljavax/faces/context/FacesContext;)V(RenderingUtilities.java:78)
         at com.sun.rave.web.ui.renderer.AbstractRenderer.encodeChildren(Ljavax/faces/context/FacesContext;Ljavax/faces/component/UIComponent;)V(AbstractRenderer.java:194)
         at javax.faces.component.UIComponentBase.encodeChildren(Ljavax/faces/context/FacesContext;)V(UIComponentBase.java:701)
         at javax.faces.webapp.UIComponentTag.encodeChildren()V(UIComponentTag.java:607)
         at javax.faces.webapp.UIComponentTag.doEndTag()I(UIComponentTag.java:544)
         at jsp_servlet.__vesselsmovements._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(__vesselsmovements.java:1060)
         at weblogic.servlet.jsp.JspBase.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(JspBase.java:33)

    Well, I have solve this problem myself.. apparently, I used static variables to initalise the app. Changing the static variables to session variables solved the problems.

  • HttpServletResponse.sendRedirect bug in Release 2

    I think I've come across a bug with the HttpServletResponse.sendRedirect() method and OC4J in 9iAS R2.
    I've constructed the following statement:
    response.sendRedirect("http://www.myurl.com/index.jsp?src1=http://www.abc.com&src2=http://www.somewhere.com
    What happens when the servlet containing this method is invoked is the redirect attempts to connect to:
    http://www.myurl.com/index.jsp?src1=http:/www.abc.com&src2=http:/www.somewhere.com
    The double forward slashes in the query string portion of the request URL are replaced with a single slash!
    I've tested this on different R1 and 10g OC4J versions and it works perfectly. The bug only arises in R2. Unfortunately for me, I have to get this working in an R2 environment.
    Has anyone come across this problem before, and worked around it?
    Thanks very much in advance.
    Lawrence

    Vikas,
    all clear but that v('P102_ID') call is bothering me!
    And other thing....I was debugging in first function (with number parameter)...and if API is making VARCHAR2 value, then in no circumstances first function (with number) cannot be called but only second one (with two VARCHAR2)...which was not called !!!!
    To make more clear, create two function (in this order in package):
    FUNCTION update_password (
                p_id       IN HTMLDB_USERS.ID%TYPE
               ,p_password IN HTMLDB_USERS.PASSWORD%TYPE
              ) RETURN PLS_INTEGER;
    BEGIN
      dbms_output.put_line(v('P102_ID'));
      dbms_output.put_line('Number called function "'||to_char(p_id)|'"');
      return null;
    END;
    FUNCTION update_password (
                p_username       IN HTMLDB_USERS.USERNAME%TYPE
               ,p_password IN HTMLDB_USERS.PASSWORD%TYPE
              ) RETURN PLS_INTEGER;
    BEGIN
      dbms_output.put_line(v('P102_ID'));
      dbms_output.put_line('VARCHAR2 called function "'||p_username||'"');
      return null;
    END;and make a call like in my case.
    This is most interesting of all! Intersting which function will be called!
    Maybe this note helps someone to be mislead...
    Message was edited by:
    Funky

Maybe you are looking for

  • Install Code Check

    Before beginning I'll have set up the hard drive with a 25gb Windows FAT partition on dev/sda3 and 25 GB free space remaining. Creates Linux system with all partitions including /boot in lvm group, and encrypts /home /var and /root NOTE: Grub as inst

  • Security Deposit Amount from customer should not be deducted

    Hi, client requirement is Security deposit from Dealer(Customer) should not show the balance of amount of Invoice of the Dealer, It should be shown seperately and not show the balance after deducting Security deposit. This security deposit is returna

  • How to change phones and keep account?

    I have an account with Boost Mobile and I haven't had any problems with my account. I accidentally broke my phone's screen and I need to buy the same phone (LG Venice) and switch it. How can I do that without losing my number or account? And will tha

  • How well does the calendar feature work?

    i know some people had some problems early on. how well is it working now. what about the printed results? appreciate any feedback.

  • Custom tag for selecting BW images

    I wish LR had a filter button to select the images converted to grayscale via Treatment command or 'V' button. For now I have to flag 'em either by star rating (and keep in mind not to do that with color photos) or color tagging.