Filtering of JSP request

hi all,
I want to filter my every jsp request. for that i have change my web.xml by adding the following entry
<filter>
<filter-name>FilterAllRequests </filter-name>
<filter-class>com.cdb.common.R equestFilterServlet</filter-class>
</filter>
<filter-mapping>
<filter-name>FilterAllRequests </filter-name>
<url-pattern>/*</url-patter n>
</filter-mapping>
Reques tFilterServlet filter class is in web-inf/classes/com/cdb/common
but when i restart the server... it gives following error
<Aug 10, 2004 4:10:26 PM IST> <Error> <HTTP> <101165> <Could not load user defined filter: com.cdb.common.RequestFilterServlet
jav a.lang.ClassCastException: com.cdb.common.RequestFilterServlet
at weblogic.servlet.internal.WebAppServletCon text.registerFilter(WebAppServletContext.j ava:2447)
at weblogic.servlet.internal.WebAppServletCon text.initFilters(WebAppServletContext.java :2433)
at weblogic.servlet.internal.WebAppServletCon text.preloadResources(WebAppServletContext .java:2703)
at weblogic.servlet.internal.HttpServer.prelo adResources(HttpServer.java:563)
at weblogic.servlet.internal.WebService.prelo adResources(WebService.java:476)
at weblogic.t3.srvr.ServletInitRunner$1.run(S ervletInitRunner.java:50)
at weblogic.security.service.SecurityServiceM anager.runAs(SecurityServiceManager.java:7 80)
at weblogic.t3.srvr.ServletInitRunner.run(Ser vletInitRunner.java:46)
at java.lang.Thread.run(Thread.java:479)
& gt;
<Aug 10, 2004 4:10:27 PM IST> <Notice> <WebLogicServer> <000354> <Thread "ListenThread.Default" listening on port 7001>
<Aug 10, 2004 4:10:27 PM IST> <Notice> <Management> <141030> <Starting discovery of Managed Server... This feature is on by default, you
may turn this off by passing -Dweblogic.management.discover=false><Aug 10, 2004 4:10:27 PM IST> <Notice> <WebLogicServer> <000331> <Started WebLogic Admin Server "myserver" for domain "mydomain" running
in Development Mode>
<Aug 10, 2004 4:10:27 PM IST> <Notice> <WebLogicServer> <000365> <Server state changed to RUNNING>
<Aug 10, 2004 4:10:27 PM IST> <Notice> <WebLogicServer> <000360> <Server started in RUNNING mode>
*************************< BR>what will be the problem?
Thanx in advance
Deepali

HI DIPALI >>>>>>>>>>>>>>>>>>>>>>>>>>

Similar Messages

  • How to assign one JSP request object to another JSP

    Hi,
    I want to assign one JSP request object (i.e., previous JSP Page request object) to another JSP (i.e., current JSP page request object).
    I don't want to use "<jsp:forward>" tag or "RequestDispatcher" obect here.
    Because i want to display one message in the current JSP page, before sending both JSP pages' request to a servlet. How to do this ?
    please help
    Thanks in advance
    Vishnu

    You cannot assign a request and response object of one jsp/servlet to another, every jsp or a servlet get is own fresh copy of request and response object with the request parameter data from the previous page.
    Unless u use request dispatcher or jsp:forward action, this solution that u r looking for by re-assigning the request and response object doesn't work

  • Reading jsp request in jsf code

    I have a normal jsp page. On submitting the page a normal HttpRequest is generated.
    I need the jsf page t read this request, extract its attributes and display the desired results.
    the jsf page is using the backing beans to get the results.
    i would like to know if it is possible to read a plain jsp request if yes.....would like to know how.
    Thanks.

    thank you for the replies. There is a problem collecting parameters in the backing bean. Could u give me a url where i can find such a sample application done. I would like to see the page navigation and how it is managed. I mean is there a need for an interface like a servlet betwn the jsp page and the backing bean.
    Thanks and regards.

  • JSP request.getParameter bug

    i try the following code for receive Parameters from jsp.
    <% String name=request.getParameter("Name"); %>
    but when Name TextField(in HTML) is empty and i want to check
    for none empty field with (if) instruction with following code..
    if(name ==null ) //somecodes..
    this instruction not run and programs continue .

    It's not a bug.
    <%
    String name=request.getParameter("Name");
    if (name == null) {
      //what to do if parameter does not exist
      //e.g.: a checkbox not checked
    } else if (name.trim().equals("")) {
      //what to do if parameter exists but is 'empty'
      //e.g.: an text input field with no non-whitespace characters
      //NOTE: if you want leading and trailing spaces to be
      //      considered values, remove the .trim() from the condition
    } else {
      //there is a value.. do with it as you will
    %>

  • Jsp request.getparameter doesn't get querystring values

    We have recently deployed our jsp application which was running successfully on ias8i apache jserv into the 8.1.7 JVM and configured the mod_ose on the Oracle HTTP server every thing seems to be fine except the following case.
    Here we are accepting the userid,password from a jsp and submiting to the same jsp for action on submit we are reading a combination of jsp form feilds and url querystrings strangely we are able to get values only for the form feilds and querystrings return null.
    The same peice of code works fine on apache jserv implementation.
    Any clues please write to me.
    <SCRIPT Language="JavaScript">
    function check_password()
    document.Login.action ="problem.jsp?tab=YES&nSessionId="+document.Login.sessionid.value+"&nUserId=" + document.Login.userid.value;
    document.Login.target = "_top";
    document.Login.method = "post";
    document.Login.submit();
    </SCRIPT>
    <%
    userid = request.getParameter("userid");
    password = request.getParameter("password");
    tab = request.getParameter("tab");
    %>
    <form name="Login" Border="0" TopMargin="0" LeftMargin="0" Marginheight="0" Marginwidth="0">
    <table>
    <tr>
    <td class="FORMHEADERLEFTB"><b> Login</td>
    <td class="FORMHEADERLEFT">:</td>
    <td><input TYPE="TEXT" NAME="userid" SIZE="25" VALUE="<%=userid%> MAXLENGTH="10"></td>
    </tr>
    <tr>
    <td class="FORMHEADERLEFTB"> Password</td>
    <td class="FORMHEADERLEFT">:</td>
    <td><input TYPE="password" NAME="password" SIZE="25" VALUE="<%=password%>" MAXLENGTH="10" onChange="check_password()"></td>
    </tr>
    </table>
    <input type="hidden" name="sessionid" value="999999">
    </form>
    Thanks
    suresh
    null

    How are you retrieving the parameter values? I am able to retrieve parameters successfully using the following simple testcase:
    untitled1.jsp:
    <form method="post" action="servlet1">
    <P>Username:
    <input type="text" name="un"/>
    </P>
    <P>Password:
    <input type="text" name="pw"/></P>
    <P>
    <input type="submit" value="Submit"/>
    </P>
    </form>
    servlet1.java: (copy and paste from doGet() to doPost() method depending on value of form method in untitled1.jsp)
    String un = request.getParameter("un").toString();
    String pw = request.getParameter("pw").toString();
    out.println(un);
    out.println(pw);
    Please test this and let me know your results and the differences with what you are trying to do.
    Regards,
    Lynn
    Java Tools Team

  • Hitting Stop Button in the middle of a JSP Request

              From a browser while servlet is doing some work for a users request, the user hits the stop buttom. In the process the
              servlet forwards the results to a JSP to be displayed using the request dispatcher, The result is the appserver goes
              into what looks like a loop.
              Any ideas how to handle a request that has not been finished when a user hits the stop button?
              We are using WL 5.1, SP7.
              Thanks.
              

    The camera formats the memory card using the "FAT32" filesystem rather than a proprietary filesystem.  This allows the card to be read by nearly any computer (Windows, Mac, etc.)  
    HOWEVER... there's a limitation in that filesystem that no single file can grow above a specific size.  That size is 4GB.
    Also, the camera documentation describes that the camera will stop just 1 second short of the 30 minute mark regardless of the file size.  
    In pro video, movies are normally constructed by bringing together many very short clips.  The one-long-continuous-take video style isn't used.  If you are attempting to record a long event in one-long-continuous-take then it would be better to use a video camera for the task.
    Tim Campbell
    5D II, 5D III, 60Da

  • WebLogic 6.0 SP1 Duplicates JSP Request

              I have run into a problem where WebLogic seems to be duplicating
              page requests, which causes my web application to enter duplicate data items.
              Essentially I have one JSP page,
              ItemMaster.jsp, that includes a couple of pages that do
              supplemental processing depending on which tab is chosen by the user. The error
              only seems to occur when adding records, as processing the other requests twice
              in succession doesn't duplicate database data. I have placed debug statements
              at the
              beginning and ending of the main page, ItemMaster.jsp. Once the
              app server hits "End Item Master JSP", there should be no processing left, as
              it is the last line in the JSP. The first set of trace statements executes correctly
              if I wait at least one minute from the end of processing the last request. Otherwise
              at the bottom set of trace statements, you see that it
              processes the same page twice, duplicating data.
              One other note, the browser window the JSP is processing in is
              another spawned window to create a dialog like look-and-feel. So there are two
              physical browser windows open at the same time. Coincidence? I don't know.
              I'm using WebLogic 6.0 SP1.
              Any help you can provide would be greatly appreciated.
              Regards,
              Matt Parker
              ===============================================================
              Debug Trace during correct processing after waiting at least one minute from the
              prior request
              ================================================================
              <--- Begin Item Master JSP --->
              ItemMasterBean.checkCommand: 0
              Tab: Item Master Cycle Steps Tab
              <--- Adding New Task... --->
              MIProfileTask.add 24_1143578264_1148909342
              MIProfileTaskId 1143578264_1148909342
              ItemMasterBean.checkCommand: 5
              SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM
              tblItemMaster WHERE
              fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc FROM
              tblItemSupplier, tblSupplier WHERE tblItemSupplier.fdSupplierCode =
              tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              BUCode: GAS
              ItemCode: 0111B829
              PROFILE: 24
              Calling Item Master Cycle Steps JSP
              ItemMasterCycleSteps.jsp
              Parent Key 24_1143578049_1145772805
              Item Profile 24 ItemMasterBean profile 24
              After 1
              <---- ItemMasterCycleSteps.jsp END ---->
              Finished calling Item Master Cycle Steps JSP
              <--- End Item Master JSP --->
              Here is what happens when I tried to add another tasks after
              updating the last task. The browser had completely stopped processing.
              Debug trace during failure:
              ===========================================================
              <--- Begin Item Master JSP --->
              ItemMasterBean.checkCommand: 0
              Tab: Item Master Cycle Steps Tab
              <--- Adding New Task... --->
              MIProfileTask.add 24_1143578276_1149056729
              MIProfileTaskId 1143578276_1149056729
              ItemMasterBean.checkCommand: 5
              SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM
              tblItemMaster WHERE
              fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc FROM
              tblItemSupplier, tblSupplier WHERE
              tblItemSupplier.fdSupplierCode =
              tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              BUCode: GAS
              ItemCode: 0111B829
              PROFILE: 24
              Calling Item Master Cycle Steps JSP
              ItemMasterCycleSteps.jsp
              Parent Key 24_1143578049_1145772805
              Item Profile 24 ItemMasterBean profile 24
              After 1
              <---- ItemMasterCycleSteps.jsp END ---->
              Finished calling Item Master Cycle Steps JSP
              <--- End Item Master JSP --->
              <--- Begin Item Master JSP --->
              ItemMasterBean.checkCommand: 0
              Tab: Item Master Cycle Steps Tab
              <--- Adding New Task... --->
              MIProfileTask.add 24_1143578277_1149059577
              MIProfileTaskId 1143578277_1149059577
              ItemMasterBean.checkCommand: 5
              SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM tblItemMaster WHERE
              fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc FROM
              tblItemSupplier, tblSupplier WHERE
              tblItemSupplier.fdSupplierCode =
              tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              BUCode: GAS
              ItemCode: 0111B829
              PROFILE: 24
              Calling Item Master Cycle Steps JSP
              ItemMasterCycleSteps.jsp
              Parent Key 24_1143578049_1145772805
              Item Profile 24 ItemMasterBean profile 24
              After 1
              <---- ItemMasterCycleSteps.jsp END ---->
              Finished calling Item Master Cycle Steps JSP
              <--- End Item Master JSP --->
              

    This happens in WebLogic 6.1 SP2 as well when using IE5.5 + and Netscape
              6.0. It also seems to slow things down since the response waits for this
              second request. I'm curious if anyone can expand on why this is happening
              and what is meant by "add logic that prevents multiple updates in your
              page". If you try out the BEA demo apps, you might notice that this happens
              with their pages as well. At least it does with Stockportal...
              "Matt Parker" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Bob,
              >
              > Thanks for the insight. I've been racking my brain for the last couple of
              days.
              > I was using IE 5.5, and found IE 6.0 to have the same problem. I'm getting
              Netscape
              > to test this as well.
              >
              > Thanks,
              >
              > M.
              >
              >
              >
              > "Bob Lee" <[email protected]> wrote:
              > >I'v run into this, too. The issue ended up being with Internet Explorer
              > >5.5.
              > >You can either add logic that prevents multiple updates in your page,
              > >or you
              > >can play around and try a different method for redirecting to that page.
              > >
              > >If the data is mission critical, go with the first because this could
              > >be a
              > >potential security hole (i.e. users could corrupt data).
              > >
              > >If it's logging or something like that (it was in my case), use the
              latter
              > >solution.
              > >
              > >Bob
              > >
              > >
              > >"Matt Parker" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> I have run into a problem where WebLogic seems to be duplicating
              > >> page requests, which causes my web application to enter duplicate data
              > >items.
              > >> Essentially I have one JSP page,
              > >> ItemMaster.jsp, that includes a couple of pages that do
              > >> supplemental processing depending on which tab is chosen by the user.
              > >The
              > >error
              > >> only seems to occur when adding records, as processing the other
              requests
              > >twice
              > >> in succession doesn't duplicate database data. I have placed debug
              > >statements
              > >> at the
              > >> beginning and ending of the main page, ItemMaster.jsp. Once the
              > >> app server hits "End Item Master JSP", there should be no processing
              > >left,
              > >as
              > >> it is the last line in the JSP. The first set of trace statements
              executes
              > >correctly
              > >> if I wait at least one minute from the end of processing the last
              request.
              > >Otherwise
              > >> at the bottom set of trace statements, you see that it
              > >> processes the same page twice, duplicating data.
              > >>
              > >> One other note, the browser window the JSP is processing in is
              > >> another spawned window to create a dialog like look-and-feel. So there
              > >are
              > >two
              > >> physical browser windows open at the same time. Coincidence? I don't
              > >know.
              > >>
              > >> I'm using WebLogic 6.0 SP1.
              > >>
              > >> Any help you can provide would be greatly appreciated.
              > >>
              > >> Regards,
              > >>
              > >> Matt Parker
              > >>
              > >> ===============================================================
              > >>
              > >>
              > >> Debug Trace during correct processing after waiting at least one minute
              > >from the
              > >> prior request
              > >>
              > >> ================================================================
              > >>
              > >>
              > >> <--- Begin Item Master JSP --->
              > >> ItemMasterBean.checkCommand: 0
              > >> Tab: Item Master Cycle Steps Tab
              > >> <--- Adding New Task... --->
              > >> MIProfileTask.add 24_1143578264_1148909342
              > >> MIProfileTaskId 1143578264_1148909342
              > >> ItemMasterBean.checkCommand: 5
              > >> SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM
              > >> tblItemMaster WHERE
              > >> fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc
              > >FROM
              > >> tblItemSupplier, tblSupplier WHERE tblItemSupplier.fdSupplierCode =
              > >> tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              > >> tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              > >> BUCode: GAS
              > >> ItemCode: 0111B829
              > >> PROFILE: 24
              > >> Calling Item Master Cycle Steps JSP
              > >>
              > >> ItemMasterCycleSteps.jsp
              > >> Parent Key 24_1143578049_1145772805
              > >> Item Profile 24 ItemMasterBean profile 24
              > >> After 1
              > >> <---- ItemMasterCycleSteps.jsp END ---->
              > >> Finished calling Item Master Cycle Steps JSP
              > >> <--- End Item Master JSP --->
              > >>
              > >>
              > >>
              > >>
              > >> Here is what happens when I tried to add another tasks after
              > >> updating the last task. The browser had completely stopped processing.
              > >>
              > >> Debug trace during failure:
              > >> ===========================================================
              > >>
              > >> <--- Begin Item Master JSP --->
              > >> ItemMasterBean.checkCommand: 0
              > >> Tab: Item Master Cycle Steps Tab
              > >> <--- Adding New Task... --->
              > >> MIProfileTask.add 24_1143578276_1149056729
              > >> MIProfileTaskId 1143578276_1149056729
              > >> ItemMasterBean.checkCommand: 5
              > >> SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM
              > >> tblItemMaster WHERE
              > >> fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc
              > >FROM
              > >> tblItemSupplier, tblSupplier WHERE
              > >> tblItemSupplier.fdSupplierCode =
              > >> tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              > >> tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              > >> BUCode: GAS
              > >> ItemCode: 0111B829
              > >> PROFILE: 24
              > >> Calling Item Master Cycle Steps JSP
              > >> ItemMasterCycleSteps.jsp
              > >> Parent Key 24_1143578049_1145772805
              > >> Item Profile 24 ItemMasterBean profile 24
              > >> After 1
              > >> <---- ItemMasterCycleSteps.jsp END ---->
              > >> Finished calling Item Master Cycle Steps JSP
              > >> <--- End Item Master JSP --->
              > >> <--- Begin Item Master JSP --->
              > >> ItemMasterBean.checkCommand: 0
              > >> Tab: Item Master Cycle Steps Tab
              > >> <--- Adding New Task... --->
              > >> MIProfileTask.add 24_1143578277_1149059577
              > >> MIProfileTaskId 1143578277_1149059577
              > >> ItemMasterBean.checkCommand: 5
              > >> SQL: SELECT fdMIProfileId, 'Default' AS fdSupplierDesc FROM
              tblItemMaster
              > >WHERE
              > >>
              > >> fdBUCode=? AND fdItemCode=? UNION SELECT fdMIProfileId, fdSupplierDesc
              > >FROM
              > >> tblItemSupplier, tblSupplier WHERE
              > >> tblItemSupplier.fdSupplierCode =
              > >> tblSupplier.fdSupplierCode AND tblItemSupplier.fdItemCode=? AND
              > >> tblItemSupplier.fdBUCode=? ORDER BY fdSupplierDesc
              > >> BUCode: GAS
              > >> ItemCode: 0111B829
              > >> PROFILE: 24
              > >> Calling Item Master Cycle Steps JSP
              > >> ItemMasterCycleSteps.jsp
              > >> Parent Key 24_1143578049_1145772805
              > >> Item Profile 24 ItemMasterBean profile 24
              > >> After 1
              > >> <---- ItemMasterCycleSteps.jsp END ---->
              > >> Finished calling Item Master Cycle Steps JSP
              > >> <--- End Item Master JSP --->
              > >>
              > >
              > >
              >
              

  • Multiple Vendor URL JSP Request Source Code Disclosure Vulnerability

              Has anybody heard about this vulnerability in weblogic web server? If so, is there
              a fix now or is BEA planning one soon? This is a potentially serious security
              hole.
              The problem exists in the way the web server handles decoding a requested URL.
              If the URL contains hex encoded values for characters in a filename, the contents
              of the requested file will be served to the client. If the requested file type
              is jsp the source will be sent to the client instead of the compiles version.
              If anybody has a fix, please post.
              

              Check Weblogic developer center, where you can find some security patches (including
              the one you mention) on right pane.
              http://developer.bea.com
              "Jay Reynolds" <[email protected]> wrote:
              >
              >Has anybody heard about this vulnerability in weblogic web server? If
              >so, is there
              >a fix now or is BEA planning one soon? This is a potentially serious
              >security
              >hole.
              >
              >The problem exists in the way the web server handles decoding a requested
              >URL.
              > If the URL contains hex encoded values for characters in a filename,
              >the contents
              >of the requested file will be served to the client. If the requested
              >file type
              >is jsp the source will be sent to the client instead of the compiles
              >version.
              >
              >If anybody has a fix, please post.
              

  • Problems with filters and jsp pages.

    I have the following simple filter that checks if there is user information in the session object and redirects accordingly:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginFilter implements Filter
         public void init(FilterConfig filterConfig) {}
         public void destroy() {}
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
         throws IOException, ServletException
              System.out.println("filter");
              HttpSession session = ((HttpServletRequest)request).getSession();
              String action = request.getParameter("action");
              if(action != null && !action.equals("login") && !action.equals("wronglogin"))
                   if(session.getAttribute("username") == null)
                        ((HttpServletResponse)response).sendRedirect("index.jsp?action=wronglogin");
                        System.out.println("User not OK, kicking out...");
                   else
                        chain.doFilter(request, response);
                        System.out.println("User OK, letting in...");
              else
                   chain.doFilter(request, response);
    }The filter is mapped to an admin page with the name index.jsp. However, I get an error for every <% and %> tag in the file (there are quite a few) when I use the filter with the page. The page works fine without the filter, and the filter seems to work with pages without scriptlets (without the <% and %> tags). Here is the beginning of the error report:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on tokens, AnnotationName expected instead
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on tokens, delete these tokens
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    Jasper gives me many errors per <% and %> tag. As you can see there is a <% tag on line 6. Any idea, why this does not work?
    Thanks!
    Message was edited by:
    chincillya

    What is the JSP scriptlet code at line 6 ?
    By looking at the code we can identify if there are any syntax errors, otherwise we can't really guess what might be the problem.

  • JSP requests hang in HTTPs

    Hi, friends, I need an ergent help !
    We are using Weblogic 6.0 without service pack, and using some third-party tag
    library in our JSPs. Without HTTPs, everything works fine. After we install SSL
    with Weblogic demo certificates, some JSPs hang when tag library is used. It looks
    like tag library does its job, but never returns. The JSP returns only when we
    close the browser.
    I believe when the request reaches inside a JSP, it is nothing to do with SSL
    anymore, am I right ?
    Any help would be appreciated !
    Thanks
    John

    Thanks, Jerry,
    I think the problem is because of request.getParameterNames() doesn't work correctly
    for SSL in Weblogic 6.0, do you know if sp2 will fix that problem ?
    By the way, I posted another question for specific title.
    Thanks
    John
    Jerry <[email protected]> wrote:
    >
    Hi John
    I believe when the request reaches inside a JSP, it is nothing to dowith SSL
    anymore, am I right ?
    Yes, that's right, to the best of my knowledge
    I strongly recommend putting SP2 on WLS 6.0 -- a ton of kinks were
    worked out in the
    first 2 service packs.
    See if you're still having this problem, and post again --
    Cheers
    Joe Jerry

  • Behaviour of jsp request

    Can i assume that the scopes in JSP work like hashtables?
    if i do
    Object object = new ReallyBigObjectThing();
    request.put("key1", object);
    request.put("key2", object);then i am not wasting much resources because references in JSP work just like references in java?
    (yes this is the wrong forum, but its more active, so blow me)

    then i am not wasting much resources because
    references in JSP work just like references in java?Just to clarify, a Java Server Page (JSP) is Java. There is no difference, so the comparison in your question does not make sense.
    The purpose of the JSP Engine in a Java-based webserver is to take the JSP file and create a Java servlet. The HTML tags that are in the JSP page get integrated into the servlet code. Any custom tag libraries get integrated into the servlet code. Any scriplet code in the JSP file gets transferred into the servlet code. A servlet is basically a Java program that executes inside a web server with a JVM.
    At this point, the servlet container prepares the HTTP Response and the web server sends the HTTP Response to the client.

  • Loading JSP Request Object on Application Init

    Background:
    I've been searching for close to two days for an answer to this question, it's full of gotchas and I can't quite get it figured out.
    I have an application which contains several web services. These services load up listeners when the services are invoked which makes them available for input. The user has the option of disabling automatic load of these services and invoking them manually by typing in the local url and starting the app. The can allow the autoload which uses a the or allowing the auto load to start. Currently the local url is hardcoded in a property file and this is how the services knows the local endpoint to envoke when it autostarts.
         <servlet id="AutoStart_01">
         <servlet-name>autoStart</servlet-name>     
         <servlet-class>com.loadmy.StartupClass.Here</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
    This works all fine and well until it's deployed onto a machine that runs a local weblogic cluster that has more than one jvm (and multiple ports) loading the application up.
    Problem
    The question is, how can you get the applicaton to recoginize the local url for the jvm that is running which can be on different ports? Here's what I've tried
    A - Using Inet.Address - This doesn't let you know what port your application is on
    B - Using the load servlet on start up ( Only the init() function is called and the request object hasn't been created and the request object is what contains ther protocol, server and port information)
    C - Loading a jsp page (READ... purposefully loading a jsp page) on application start. The thought here is that this contains a request object, but unfortunately on this doesn't work in my servlet container (currently tomcat 6 but the application is for a web logic machine)
    D - I thought about possibly using System.properties() but no luck there
    I'm at witts end on this one and I know there is something that can recoginze the local servlet container and extract the url and port from it.
    Any suggestions would be great.
    Flabergasted [sic]

    When you request from jsp1 comes to jsp2, it gets the request object.
    Now if you want to pass the same request object ot next jsp3, then please call the forward(request, response) as below:
    <jsp:forward page="jsp3.jsp">
    //This will forward the same request, response object which is there in jsp2

  • URGENT..how to get ip address or computer name of user making a JSP request

    Hi,
    How do i in my jsp, get the user ip address or any other kind of identification via JSP..
    issit something like this...
    <%
    request.getRemoteUser() ;
    %>
    this jsp will be accessed when the remote user clicks a link from a normal web page...

    request.getRemoteUser usually gives the user name if the Authentication header is present and in case the user is authenticated via http authentication based mechanism.. when you want the ip address of a machine try the methods in socket.
    Something like this,
    InetAddress ia=<socketobject>.getInetAddress();
    String str=ia.getCanonicalHostName();
    Hope this Helps
    Hi,
    How do i in my jsp, get the user ip address or any
    y other kind of identification via JSP..
    issit something like this...
    <%
    request.getRemoteUser() ;
    %>
    this jsp will be accessed when the remote user
    r clicks a link from a normal web page...

  • Saving the output from a JSP request

    I have developed a decision support web site that amongst other things generates a "report" page. Now my client would like to add the ability for users of the site to have that report emailed out to them.
    Sending the email obviously isn't a problem, but getting the content into it is. I really don't want to have to duplicate all the JSP code from the report page (there's a lot, including calls to beans etc), and reformat the entire thing with hundreds of out.write("<table>") like statements, or nasty plain-text formatted equivalents.
    So...is there a way to "save" the output generated by the server before it gets sent back to the user - ideally to a local file that I can then just dump straight into the email message. I can't just call the page (internally on the server) to see its output, as it's user-specific and uses a lot of session-related information.
    Cheers for any advice...
    Iain

    It's actually possible to do what I want to do by getting the server to call the page internally (I didn't think it was).
    A simple URLConnection to the appropriate page with the jessionid appended gives me back the page as the user would see it. I can then just stream the response from that to file/email/whatever.
    When the user clicks on their "email" link, I just call a jsp file (or a servlet) with the following code:
         URLConnection uc;
            BufferedInputStream fin;
         BufferedOutputStream fout;
         String location = "http://localhost:8080/blah/report.jsp"
              + ";jsessionid=" + session.getId();
         String filename = "C:\\output.html";
         try
              uc = new URL(location).openConnection();
              fin  = new BufferedInputStream(uc.getInputStream());
              fout = new BufferedOutputStream(new FileOutputStream(filename));
              int byteRead = fin.read();
              while (byteRead != -1)
                   fout.write(byteRead);
                   byteRead = fin.read();
              fout.close();
              fin.close();
         catch (Exception e) {}Now all I have to do is go learn how to write multipart emails using JavaMail...

  • Generating a XML file from a JSP request Page

    Hi,
    I am very new to JAVA with XML. My need is i want to capture some data in in a JSP page then after submitting ,it will generate a XML file. How can i do that??? Any help will be highly appriciated. If anybody can give me a good example....
    Thx

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Are you using our XML SQL Utility that comes with the Oracle XDK for Java? Is the correct result produced, but you are having trouble writing it to a file?<HR></BLOCKQUOTE>
    hi steven,
    yes i am using xml sql utility and have solved the problem..... as i was working from a remote system i didnot give the correct path that is the c:\.....etc of the machine i was giving http:// thats why i did not write to a file... now its working

Maybe you are looking for