Problem using url rewriting

Hi!
I am currently developing a struts based BC4J application. This application has to run using the internet explorer without java-script and cookies.
Currently with cookies enabled everything is fine. But when i disable cookies it seems as if the application does not find the session context anymore.I fall back to the login-screen, which should happen, if the user is not logged in (which i check with a '<logic:notPresent name="user" scope="session">' tag).
Right now the application is stateful (though it also runs in stateless mode).
It even seemed to me as if the session id changes before i fall back to the login screen.
Does anybody know if i make somthing wrong. Or is it possibly a bug?
thanx
Hendrik

Repost!
Please, if anyone nows something (every hint can be helpfull), it is urgent!

Similar Messages

  • Always use URL Rewriting for session tracking?

    All you JSP guru:
    I am working on a JSP project that requires session tracking. I have successfully implements session tracking with both cookies or URL rewriting. I know that with the HttpSession object, it will always try to use cookie first, if that's disabled, then it'll automatically switch to URL rewriting. However, is there a way to force the HttpSession object to ALWAYS use URL rewriting instead of cookies? I have searched for an answer for a long time and haven't been able to found a solution. Is it possible at all? Thank you very much.

    i was going to say that WebSphere always uses URL rewriting if you enable it at all, but someone beat me to it (indirectly) :-)
    however, that seemed to me to be a violation of the spec, which seemed to imply the behaviour you're describing (only use URL rewriting if cookies are not supported on the current client)
    here's a response someone else made on a websphere newsgroup to a statement in that regard:
    I believe you are technically correct. However from my
    experience, I think the spec if flawed in this area since
    there is no reliable way of determining whether the
    client browser supports cookies. The authority on
    cookies (www.cookiecentral.com) says:
    "To properly detect if a cookie is being accepted via
    the server, the cookie needs to be set on one HTTP
    request and read back in another. This cannot be
    accomplished within 1 request."
    This is asking too much of a servlet engine
    implementation. Even if it did submit a request for this
    purpose, the user could refuse the cookie. So
    then technically the browser supports cookies, but the
    servlet engine infers it doesn't. So if the servlet engine
    infers the browser does not support cookies and so
    encodes the URL, it is again out of spec because the
    browser really does support cookies. By doing it
    however encoding is configured makes things simpler,
    robust, consistent and avoids the flaw.
    My opinion.so, mostly i'm just rambling, but if you're using websphere, you should get the behaviour your boss wants. if you're using something else, i suppose there's a chance it'll "violate" the spec in this same, potentially helpful way.
    btw, i remember somebody else complaining that URL rewriting is less secure than cookies, but i kinda think they're about equal. it seems like either could be intercepted by a sniffer and then used to spoof. but i'm no expert in that stuff...

  • Unable of keep session using url rewriting tomcat

    Hi everybody,
    I have an application which communicates with a servlet. I am trying to use session tracking for my midp application with the url rewriting technique because of simplicity. I have tomcat 4.0.3 and MIDP 2.0. I had forced the use of url rewriting including this line into the server.xml file from tomcat:
    <Context path="/webappname" debug="0" cookies="false" docBase="webappname"/>
    This should force url rewriting, but when i call the method encodeURL in my servlet i only get a void
    string. I know this isnt the best forum for this, but i have to try ;-). Any suggestion? all comments will be wellcomed, but please i dont want to use cookies and the rms api.
    Thanks.

    Are you aware that the MIDlet's networking won't support cookies or redirections automatically, and that you have to code that yourself: reading the "set-cookie" header and saving it for later, or catching redirection response codes (3xx) and changing the url accordingly?
    Check out these tutorials:
    http://www.javaworld.com/javaworld/jw-04-2002/jw-0426-wireless.html
    http://developers.sun.com/techtopics/mobility/midp/articles/servlets/
    shmoove

  • Using URL Rewrite for HNSC Web App

    Greetz!
    I'm using host named site collections in my deployment of 2013 Enterprise. I've got a single web app, on the default zone, that was created on port 443 with the -SecureSocketLayer parameter. How can I seamlessly redirect users accessing a HNSC with http
    to the correct (and only) https url? I'm using the URL Rewrite 2.0 with IIS 8.5.
    I have the following rule in place but it is still throwing a 404 on pages. Is this able to work with Host Named Site Collections and does it matter that I've installed the Web App on 443 without having it on 80 first? It shouldn't but SharePoint has
    surprised me before ;):
      <rule name="SSL Redirect" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" />
                    </conditions>
                    <action type="Redirect" url="https://{SERVER_NAME}" redirectType="Found" />
                </rule>
            <rule name="HTTP/S to HTTPS Redirect" enabled="false" stopProcessing="true">
              <match url="(.*)" negate="true" />
                <conditions logicalGrouping="MatchAny">
                        <add input="{SERVER_PORT_SECURE}" pattern="1" />
                        <add input="{SERVER_PORT_SECURE}" pattern="0" />
         </conditions>
         <action type="Redirect" url="https://{HTTP_HOST}" redirectType="Permanent" />
         </rule>
    Love them all...regardless. - Buddha

    are you using the URL Rewrite on the same IIS web application as the SharePoint sites?
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Problem using url on local image

    Hi,
    i'm currently playing around with javaFx for a udpClient and i wanted to use Image included into my jar but doesn't work.
    ImageView {     
                        image: bind Image { url: ".//image//gradient.jpg" }
    ...it gives me:
    java.net.MalformedURLException: no protocol: image//favicon.ico
            at java.net.URL.<init>(URL.java:567)
            at java.net.URL.<init>(URL.java:464)
            at java.net.URL.<init>(URL.java:413)any idea why? is it mean to be only deployed and not forcast to run as an application with internal reference to image?
    thx you in advance

    ok forget it.
    too late over here :)
    ImageView {                    
                        image: bind Image { url: "file:./image/gradient.jpg" }will do the trick

  • URL rewriting using JSTL

              We are trying to use URL rewriting using JSTL. We have some problems facing URL
              rewriting. The issues we have are
              (1) We use absolute URLs
              (2)Some times we have situations based on certain input field validations
              we use
              javascript to perform URL rewriting based on the input by the user.
              Have anyone done URL rewriting using JSTL (absolute URL versus relative URLS)
              Regds
              Guna
              

    Hi
    Kalpesh Chhatrala,
    If this issue still not resolved, please consider to post in WCF forum.
    Here is the link
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=wcf
    Now i will move your thread to Off-topic forum. If you have any other issues about C#, please feel free to post in this forum. Thanks for your understanding.
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • URL Rewriting & Mozilla

    I've noticed some functional changes between SJSAS 8 Update 1 and SJSAS 8 2004Q4 Beta regarding use of URL rewriting in webapps.
    Our servlet explicitly disables cookies in preference for URL rewriting. In SJSAS8-Update1, as for every other app server we've used (SJSAS 7 2004Q2, S17AS, Weblogic 8, Jboss), this works fine. But in the 2004Q4 beta release, URL rewriting doesn't work in Mozilla. IE works as per usual - inserting the relevant jsessionid's in the address bar.
    Consequently when the browser attempts to hit the servlet for the second time - it has no jsessionid, and the servlet doesn't recognize the session.
    As I said, this isn't a problem with any other release of the product; it seems to have been introduced in this most recent 2004Q4 beta of S1JSAS 8.
    Anyone else noticed this or have any suggestions?

    More specifically, the problem appears to exist -only- in Firefox (not Mozilla in general).
    Using LiveHTTPHeaders, its clear that Firefox 1.0 is setting the jsessionid identifier as a cookie, as opposed to URL rewriting. The other parameters are correctly passed using URL rewriting.
    Thus Mozilla is sending a URL without the jsessionid and the appserv web container cannot locate the session.
    We've set our sun-web.xml file to disable cookies explicitly using "enableCookies=false". However, Sun Appserv 8.1 2004Q4 BETA sends back a cookie to Firefox's request - even though the webapp has disabled it...
    Very frustrating!! Any help/suggestions would be gladly appreciated!

  • Bad URL rewriting on redirect

    We're having a problem with URL rewriting when we call a
    response.sendRedirect(). We're forcing the system to maintain session
    through the URL (NoCookie=1) and it usually works fine, but on redirects
    the session info is added with the & code instead of simply a &, which
    sometimes leads to lose the session or other params. Has anybody a solution
    or idea for this?
    We're using iAS 6.0 SP2 for Win NT and this is a sample of a rewritten URL:
    http://server/nasapp/app/servlet?hidPage=1&GXHC_gx_session_id_=72f76904d
    2fb143e&GXHC_GX_jst=90c77278662d6164
    Thank you
    Francesc X. Gil
    SPOC, S.L.
    mailto:[email protected]
    http://www.spoc.com

    Another bug in iAS Sp2 .....
    URL based session tracking doesn't work properly in iAS sp2 (one of my many
    case tracker issues are dedicated to this irritating bug). The bug that I
    found appeared when performing an form post using method=post to a servlet.
    Then I get a HTTP error 402 (unauthorized).
    The problem should be fixed is SP3, just like a hole heap of other bugs.
    "Quico Gil" <[email protected]> wrote in message
    news:9hup3e$[email protected]..
    We're having a problem with URL rewriting when we call a
    response.sendRedirect(). We're forcing the system to maintain session
    through the URL (NoCookie=1) and it usually works fine, but on redirects
    the session info is added with the & code instead of simply a &, which
    sometimes leads to lose the session or other params. Has anybody asolution
    or idea for this?
    We're using iAS 6.0 SP2 for Win NT and this is a sample of a rewrittenURL:
    >
    >
    http://server/nasapp/app/servlet?hidPage=1&GXHC_gx_session_id_=72f76904d
    2fb143e&GXHC_GX_jst=90c77278662d6164
    Thank you
    Francesc X. Gil
    SPOC, S.L.
    mailto:[email protected]
    http://www.spoc.com

  • IIS Reverse Proxy with URL rewrite.

    Hi all, hoping to leverage the wealth of knowledge contained here.
    Any assistance would be very welcome.
    I'm having an issue getting a reverse proxy and URL rewrite working in IIS 7.0.
    I need to redirect all requests with a specific virtual directory suffix only.
    ie; https://domain.test.com/outbound/Content/query_etc
    With /Outbound/ being the trigger.
    This should be redirected to http://10.10.10.10/inbound/Content/query_etc
    While at the same time, requests without the /outbound/ suffix should be handled locally.
    I have configured the reverse proxy as described in a few articles, and have had no luck.
    Here's a snippet from my (sanitized) web.config at the site level.
    <rewrite>
    <outboundRules>
    <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1">
    <match filterByTags="A" pattern="^http(s)?://10.10.10.10/inbound/(.*)" />
    <action type="Rewrite" value="https://domain.test.com/outbound/{R:2}" />
    </rule>
    <preConditions>
    <preCondition name="ResponseIsHtml1">
    <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
    </preCondition>
    </preConditions>
    </outboundRules>
    <rules>
    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
    <match url="^outbound/(.*)" />
    <action type="Rewrite" url="http://10.10.10.10/inbound/{R:1}" appendQueryString="true" logRewrittenUrl="false" />
    </rule>
    </rules>
    </rewrite>
    To me, this looks correct, yet it doesn't work.
    With this, I get the normal 404 - Error Code 0x80070002, with the text indicating the local directory doesn't exist, so.... not being picked up by the filter for redirection.

    Hi Andrew,
    Looking at your requirements it appears you need Reverse Proxy To Another Site/Server.
    By using URL Rewrite Module together with
    Application Request Routing module you can have IIS 7 act as a
    reverse proxy.
    It seems like URL Rewrite can't re-route the request somewhere else out of the server.
    Even when you rewrite the url the actual connection remains with the server. Hence if your original server doesn't have /inbound/Content/query_etc  it will fail with 404.
    Hosting multiple domain names under a single account using URL Rewrite.
    It’s a common desire to have a single IIS website that handles multiple sites with different domain names.
    References:
    How to create a url alias using IIS URL Rewrite:
    http://blogs.technet.com/b/mspfe/archive/2013/11/27/how-to-create-a-url-alias-using-iis-url-rewrite.aspx
    Reverse Proxy with URL Rewrite v2 and Application Request Routing:
    http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
    Regards,
    Satyajit
    Please“Vote As Helpful”
    if you find my contribution useful or “MarkAs Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • URL-Rewriting or append query string in URL

    Hi
    I have one other quetion related to my project I am working and need to finish tonight.
    I read one table in first JSP and want to send one column, eventname to the other JSP. Can I use URL-rewriting. I need to keep the event name thruoghout too.
    Is this syntax correct..
    Please help me !!!

    Syntax is:
    <a href="ListEvents.jsp?event=eventname">Click me</a>In the JSP, there are two things you may need to do when generating the link.
    1. Encode the URL - this is needed if any arguments (in this case "eventname") might include spaces or special characters.
    2. Apply URL rewriting info if this may be needed. This will add "&JSESSIONID=xxxxx" if required.
    <%
    String link = "ListEvents.jsp?event=" + getEventName();  // or whatever gets the event name
    link = java.util.URLEncode.encode(s,"UTF-8");    // encode the event name data
    link = response.encodeURL(link);                      // add the session id if URL rewriting in use
    %>
    <a href="<%=link%>">Click Me</a>The event name is retrieved using request.getParameter("event")

  • URL  Rewriting

    Hi,
    I got a problem in URL rewriting:
    original source:
    <script language="JavaScript" src="/javascript/resselect.js"></script>
    after rewrite:
    <script language="JavaScript" src="http://gate way:89/http://xxx.com/javascript/resselect.js?scriptReferrer=http://xxx.com/"></script>
    How can I remove "scriptReferrer=http://xxx.com/"?
    Thanks in advance.
    Rick.

    I had a similar problem (Portal 6.1) and it ended up being a javascript function that was not rewriting properly. I had to add a rule to my default_gateway_ruleset.
    The function being called was Select() so the rule I added was this:
    <Function type="URL" name="Select" paramPatterns=",y" />
    Refer to the portal documentation about "Rules for JavaScript Content" rewriting:
    http://docs.sun.com/source/816-6732-10/rewriter.html
    Hope that helps you.

  • URL Rewriting Session ID Length in iPlanet Application Server

    Hi there,
    Does anyone know what the maximum length of the session ID value is when
    using URL rewriting/encoding for session tracking (i.e.: ";jessionid=1234"
    appended to the end of the URL) with iPlanet Application Server 6.0's
    servlet container (or any previous versions)?
    Does the length vary or is it fixed? And does WebSphere encode server or
    failover information into the ID? WebLogic for instance, encodes the
    primary and secondary failover servers into the ID when running in a
    cluster)?
    And finally, is there any way to restrict or specify the maximum length of
    the session ID?
    I ask this due to a limitation with some WAP clients & gateways which
    prevents the URL from exceeding 128 characters.
    Any info on this issue from iPlanet staff or anyone else is much
    appreciated.
    <background-info>
    Please see the following links if you'd like some additional background:
    http://e-docs.bea.com/wls/docs60/////wap/wapdev.html#1024984
    under the heading "Session Tracking" at the bottom
    http://groups.google.com/groups?hl=en&safe=off&th=eb7f38aa5086972e,13&seekm=
    8gaki8%247d5%241%40newsgroups.bea.com#p
    </background-info>
    Regards,
    Sasha Haghani

    Sasha Haghani wrote:
    Hi there,
    Does anyone know what the maximum length of the session ID value is when
    using URL rewriting/encoding for session tracking (i.e.: ";jessionid=1234"
    appended to the end of the URL) with iPlanet Application Server 6.0's
    servlet container (or any previous versions)?
    I'm fairly certain that it is fixed. 18 for the attibute, 16 for the value, plus
    1 for the equals. (Plus 1 for the ? if it didn't already exist.)
    So 35 or 36 depending on how you count it. Someone needs to verify this and
    check my counting though.
    >
    Does the length vary or is it fixed? And does WebSphere encode server or
    failover information into the ID? WebLogic for instance, encodes the
    primary and secondary failover servers into the ID when running in a
    cluster)?I don't know what WebSphere does. iAS does not encode failover information in
    the ID. Because of the way session is propogated, no server information needs to
    be embedded in the id.
    >
    And finally, is there any way to restrict or specify the maximum length of
    the session ID?No.

  • Please explain this about URL rewriting

    I am trying to write a simple example to understand URL rewriting...
    On Test1 Servlet in the doGet I have the following     
                   HttpSession session = req.getSession(true);
                   session.setAttribute("userid","123");
                   String url = resp.encodeURL("Test2.jsp");
                   System.out.println(url);
                   resp.sendRedirect(url);In the Test2.jsp I have the following
    <P>OK......</P>
    <%String id = (String)session.getAttribute("userid");%>
    <%=id%>Even though I see the URL being appended like
    http://localhost:9080/urlTest/Test2.jsp;jsessionid=00006O173z1PBf6mXOujvK25iJc:-1
    and I also see the result 123 on the screen...
    How do I know that its not using HttpSession and its using URL rewriting?

    The call to encodeURL is what is putting the "jsessionid" section into the URL. That is what it is using to maintain the session.
    So it IS using HTTPSession, but the sessionid is being maintained via URL rewriting, rather than with a session cookie.
    As an experiment, take out the call to "resp.encodeURL()" and see what the result is.
    Also, if you are using the url to redirect to, you should be using the method response.encodeRedirectURL. The rules for encoding a url being used as a redirect are slightly different from one being used as a link on a page.

  • Apache URL rewrite

    Hi,
    To make iPlanet work with apache, documentation ask me to change
    httpd.conf so that all request comes into apache will forward to
    iPlanet.
    But I need to use URL rewrite module of apache contains the rewrite rule
    RewriteRule ^/lmp
    /NASApp/delivery/servlet/delivery;jsessionid=%{QUERY_STRING} [PT,NS]
    which means if URL contains /lmp then rewrite to iPlanet handler
    /NASApp/...etc
    any one had successfully configure apache mod_rewrite works with
    iPlanet?
    In my pervious experience with Tomcat apache. I realize I have to load
    the web-server-plugin module before module rewrite module. But if I do
    that with iAS. then i get 404 not found on request to servlet.
    thanks

    We use iPlanet and apache with mode_rewrite
    Try this:
    RewriteEngine On
    RewriteLog /usr/local/apache/logs/rewrite.log
    RewriteLogLevel 1
    # Rewrite Rules for App1
    RewriteCond %{HTTP_HOST} ^app1.company.de$
    RewriteRule ^/ https://myiWS.company.de:8011/NASApp/app1/mystartup.jsp

Maybe you are looking for

  • Loops+checking arrays

    i am adding a string to an array but first have to check if it is already present. The code i had was trying is //B is capacity of array //adding from B downwards //add is set when a new string is added for(int search = B; search != add; search--){ i

  • IPod is not showing up in ITune, but it is showing up in My computer

    IPod is not recognized by ITune. It is recognized by my computer

  • How do i put single songs on the shuffle

    its not giving me the option to add single song just albums, playlist, gen and artists

  • IPhone 5S some music grayed out

    I just got an iPhone 5S.  Backed up my old phone to computer, and used this backup to get info, data and music onto new phone.  After syncing the phone with iTunes on my computer, some songs on some albums are grayed out and have a red circle with a

  • FCP X 10.0.6 -- Preview in "Sound and Music" tab not working

    All my folders (like Final Cut Pro Sound Effects and iLife Sound Effects and so on) show up correctly in the "Sound and Music" section, but I can't preview the files inside any more - neither by hitting the space bar nor by pushing the Play button in