Reload a jsp without using javascript

I need to reload a jsp based on some jsp condition. I know that I can't do something like below:
<% if (reloadCondition == true) { %>
<script language="JavaScript">
document.location.reload()
</script>
<% } %>
Any suggestions?

You can redirect the page to the same.
Some thing like :
<% if (reloadCondition == true)
response.sendRedirect("same.jsp");
return;
%>

Similar Messages

  • Reload / Refresh JSP without using parameters

    Hi,
    I have a servlet, which gets data from a mobile phone and puts the data into a database.
    Then I have a Java Beans that takes data from the database. But I dont pass it with the
    request and response parameters.
    I just use the data like you see below, I use the object of the Java Beans mybean. In
    its constructor I do all the stuffs to read data from database.
    <jsp:useBean     id   = "mybean"   scope    = "session" class = "org.myHalloGMap.handler.Handler" />
    <jsp:setProperty name = "mybean"   property = "*" />The data I use like this:
    <%                                  
         for(int i=0;i<mybean.row_count_coordinates;i++){
                  if(mybean.getUsrn().equals(mybean.coordArrUsername)){
    row_count++;
    So my problem is now:
    How can I refresh my jsp, so that I can display the data, i read out of my database?
    When I use the webapplication and put new data into the database, on my webapplication
    is still shown without the new data. When I refresh the browser, it still shows me without
    new data?
    Can someone help me?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Perhaps the bean should be set to the request scope, since you use the constructor to read all the data from the database. When you use the:
    <jsp:useBean     id   = "mybean"   scope    = "session" class = "org.myHalloGMap.handler.Handler" />You will only create a mybean instance if one doesn't exist. When you first visit to the page the session is new, so you will create the mybean instance. After that, the mybean instance is found in the session so a new one isn't made - which means the constructor isn't called, which means no new data is read.
    If you put it in the request scope then the mybean instance will be re-made each request.

  • Pop-up display Using JSP (or JSTL) without using JavaScript

    Please tell me how to display a pop-up window , without using Javascript code.'
    Thanks
    Amarshi

    Remember that Java - on the web - is mainly used for server-side programming and applets. If you want client side activity to occur, you must use languages like javascript or vbscript.
    Vincent

  • How can I add more than one submit button in a jsp without use of javascrip

    I want to add more than one submit button in a jsp without use of javascript

    you can do add multiple submit button with this way
    <input type="submit" value="Previous" />
    <input type="submit" value="Next" />
    <input type="submit" value="Finish" />

  • Get site id in WCS jsp without using ics.SQL

    Hi,
    Is there a way i can get siteId of my current site in JSP without using ics.SQL tags and getting it from publication table
    We are trying to implemet a lucene search for loading assets present in current site only.
    Thanks in advance for your help.

    Use the below code to get it.
    <publication:load name="thisPub" field="name" value='<%=ics.GetVar("site") %>'/>
    <publication:get name="thisPub" field="id" output="thisPubID"/>
    Dont forget to import publication.tld
    Regards,
    Ravi G

  • How to execute a .exe file in java(Jsp) without using a process ???

    Hi All ,
    How to execute a .exe file in Jsp without using a process ??? ...
    Is it Possiable ????

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

  • Scrolling component into view programmatically without using javascript

    Hi,
    Is it possible to scroll an adf component into view programmatically without using javascript?
    I know of <af:scrollComponentIntoViewBehaviour> that can be added to a command component , but is there a way to do that programmatically in a bean?
    Problem with using javascript is its not guaranteed to work in different browsers.
    Regards,
    Rakesh.

    Hi John,
    Thanks for the reply.
    If i use the af:scrollComponentIntoViewBehavior, then i wont be able to achieve my desired functionality.
    In my use case, i want the id, of the component that needs to be scrolled into view, to be determined in the server listener of the button which is not happening.
    Code snippet in jspx page is as follows:
    <af:commandButton id="cb1" immediate="true">
    <af:clientListener method="clickButton" type="click"/>
    <af:serverListener type="customEvent"
    method="#{pageFlowScope.bean.doScroll }"/>
    <af:scrollComponentIntoViewBehavior id="#{pageFlowScope.bean.compId}/>
    </af:commandButton>
    And the java code for method doScroll is something like :
    public void doScroll (ClientEvent clientEvent)
    //logic to determine compId goes here
    compId = "id";
    So, the problem here is "compId" is set to some value when bean is loaded and the id in the af:scrollComponentIntoViewBehavior will be set to that value forever.
    I cant find any way of telling it to re-read the "compId" value, say after clicking the button. I can refresh the button in the server listener to update the compId .
    But the updated compId will come into picture from *next click*. This is because, after the button is clicked, "scroll" action happens first and then serverListener executes.
    Is there a way to change order of this execution like "execute server listener first and then do the scrolling thing" ?
    Regards,
    Rakesh.
    Edited by: 927925 on Jul 27, 2012 2:02 AM

  • Opening new window without using javascript..

    Hi,
    This is the second time iam posting this question. I didnt get satisfactory answer to my previous post..
    Is there any possibility of displaying a new window on button click using only JSF and without using javascript? if yes please tell me how to do..
    Thanks...

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

  • Can I use ant's api without using javascript ?

    Can I use ant's api without using javascript and which tasks we cant do without javascript in ant's build file?
    eq:
    jar=project.createTask("jar");
    jar.setDestFile(new java.io.File(project.getProperty("lib")+"/myJarFile.jar"));
    jar.setBasedir(new java.io.File(project.getProperty("classes")));
    jar.setIncludes(project.getProperty("GenericDirStructure")+"/**");
    jar.setIncludes("META-INF/**");
    jar.perform();
    can I create above jar without using javascript i. e<script language="javascript"> in build.xml file.
    Thanks,
    Archan

    Archana144 wrote:
    hello georgemc
    How to use ant's api without javascript in build.xml file because it gives error if I tries to do something like
    project.createTak("echo").in build.xml..etc ..without including this in <script language="javascirpt">
    And I cant use <jar> task directly because ..I want to crete multiple jar files depending on some configuration done in properties files..so I m doing this jar creation in loop.
    Thanks,
    Archan
    Edited by: Archana144 on Aug 13, 2008 6:00 PMHave you read all the Ant documentation? The <script> task was only added in 1.7, before that, there was no using Javascript in build files

  • How jsp to use javascript's variable??

    Hi, how jsp to use javascript's variable or a jsp's variable can be assigned a value in the javascript??
    thx

    well i havent accessed the value of javascript variable in jsp
    yet but i have accessed the value of a java variable in java script
    try it
    <script ...>
    function jspToJavaScript(a){
    alert(a);
    </script>
    <%
    int a=10;
    %>
    <img src="..." onClick="jspToJavaScript(<%=a%>)">

  • Calling url without using javascript

    Hi all,
    In my BSP application, I need to call url in a popup or in the application itself without using javascript.
    My requirement is the url should not be visible to the users. For this, if a javascript is used the url would be visible to the users whereas if the url is called in the BSP application itself then only BSP url would be visible.  Can anyone suggest some methods to call url in a BSP application?
    Thanks and Regards,
    Sneha.

    Hi Sneha,
    you can have ABAP make the HTTP request then just pass the response directly back to the web client.
    Sample of how to make a HTTP request can be found at http://help.sap.com/saphelp_nw04/helpdata/en/e5/4d3514c11411d4ad310000e83539c3/frameset.htm
    Cheers
    Graham Robbo

  • Including Applets in jsp without using Archive

    Can any one help me to include the Applet without using the Archive attribute in either <jsp:plugin> or <applet> tag. I am using WebLogic workshop8.1 on win 200 platform , it builds class files in a seperate directory which starts with .workshop dirctory. I should include that directory as the codebase for the applet.
    regards
    varada rajulu
    Turning Point Software Solutions India

    yeah. don't use it. You specify the code (class) and the codebase tag, and the classes have to be loose on the server under the package directory structure that the classes' package is set up for.

  • Force field contents to be caps only without using javascript

    Hi,
    Can a field be forced to be typed as caps only without using javacsript, I have created a template where
    if the field is typed in lowercase the javascript makes this caps. The problem being now is that this script
    doesn't work when the user is filling the form on a ipad.
    Any ideas?
    thanks in advance
    Paul

    The following custom Keystroke script works with Adobe Reader (and PDF Expert) for iOS:
    // Custom Keystroke script
    event.change = event.change.toUpperCase();

  • Manually submit a form without using javascript?

    i'm trying to automate registration of a site by using java (no gui). However there is no direct submit button or form.submit() present in its registration url. Checked the javascript codes and it opens a window, and checks if the window opener is present .
    if (window.opener && !window.opener.closed)
    window.opener.document.theForm.submit();
    window.close();               
    }Is there a solution for this problem?

    I'm trying to access an http url (not mine).
    (1) By setting post variables , I can retrieve the html of the url as string. Here's the code.
         static String getHtml(String url_nm, HashMap variables)
              String html = "";
              String data = "";
              boolean firstRun = true;
              if (variables != null)
                   Set keys = variables.keySet();
                   Iterator iterator = keys.iterator();
                   while (iterator.hasNext())
                        if (firstRun)
                             firstRun = false;
                        else
                             data += "&";
                        String name = iterator.next().toString();
                        try
                             data += URLEncoder.encode(name, "UTF-8") + "=" +
                                  URLEncoder.encode(variables.get(name).toString(), "UTF-8");
                        catch (Exception e1)
              try {
                 URL url = new URL(url_nm);
                 URLConnection conn = url.openConnection();
                 conn.setDoOutput(true);
                 OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
                 wr.write(data);
                 wr.flush();
                 BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                 String line;
                 while ((line = rd.readLine()) != null) {
                      html += line;
                 wr.close();
                 rd.close();
             } catch (Exception e) {
                  e.printStackTrace();
              return html;
    [/code
    (2) The problem is even if i set the post variables, i cannot submit the form since the form can only be submitted if i was actually browsing it in a web browser. The html displays a window where the actual submit  form is set (as you can see in my later post) .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Get context path in a jsp without using a scriptlet

    Hi Guys
    I am using Scriptlet to get a application context path in a JSP. I want to get the context path with out using an scriptlet in a JSP, is there way to achieve this..?
    <%=request.getContextPath() %>/listofvalues.do?method=viewListOfValues thanks in advance.
    Regards
    Praveen
    Edited by: praveen_kumarvr on Jul 3, 2008 8:30 AM

    ${pageContext.request.contextPath}A common practice is to put this value in the <base href> in the HTML head and then use this as the root for all of the relative URL's in the page.

Maybe you are looking for

  • ORA-12712 error while changing nls character set to AL32UTF8

    Hi, It is strongly recommend to use database character set AL32UTF8 when ever a database is going to used with our XML capabilities. The database character set in the installed DB is WE8MSWIN1252. For making use of XML DB features, I need to change i

  • In search in Safari on my Ipad how do I stop multiple first letters typed

    In the search feature of Safari how do I stop multiple first letters from automatically being entered. Example if I entered an A as the first letter it enters automatically 3 A's, This is frustrating to always have to delete 2 of the letter A to be a

  • Oracle(tm) Client and Networking Components were not found..

    I installed Oracle 9i Client tools on my machine (Win2000 Server), and successfully installed the Oracle ODBC Driver, however, upon using "Oracle in OraHome92" option in my Administrative Tools System DSN I receive the following error upon attempt to

  • Actions that I make are gone when I restart photoshop

    I make actions, they work. But when I close photoshop and reopen they are gone. I also get this message when I close photoshop cc 2014. Could not save Preferences because the file is locked, you do not have necessary access permissions, or another pr

  • Executing Query Views not populating Query Cache?

    Hi,  I'm executing 3 query views in a web template.  I was expecting this to populate the cache for the query which they are based upon, but they are not?  Can anyone verify this behavior? Thanks!