Jump to content

Search the Community

Showing results for tags 'jsp'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. Hi... I am inside Ajax success function... here is my code... I have accessed the client server url successfully, but also I have to execuet the query that i have to get the result inside the Ajax function to post in my jsp page..... can someone please assist on how we can acheive this? function Call() { var query='select * from employees'; var querystring = "joinType=3&userLocale=English&query="+query&maxrow="2; $.ajax({ url:'https://testurl', type:'POST', success: function(data, url, jqhxr) { $('#div').html(this.url); console.log('Am here nowww',this.url); } }); };
  2. I have a coded servlet already in HTTP url. I want to access and display the data from (http url) servlet to my new JSP within <div> here is the more details :https://gist.github.com/theakathir/f6fb390d35b451a57958aa0d3cf05330 about the servlet content. I am very new Ajax,. All i want to do in, In my new jsp page i will have a button to click which will access the data from the http url (servlet) using Ajax. Can someone direct me with some reference to start with.. It would be helpful Thanks.
  3. Hey there, i have a Java MVC Web Application that uses the Spring-Library for the Backend and then JSP files for the frontend. Now, in various JSP files i am using Ajax to have some smooth design when needed. This whole application is running on an Apache Tomcat Server. I have to admit that i am still very new in the whole Web-Development thing, so bare with me.Following problem: In the current state, i feel like the tomcat server is automatically handeling the Sesions, including session-timeouts. So, i can specify the time when a session is supposed to count as timed out and everything, the server recognized this correctly and whenever i try to request something with a timedout session the server automatically logs me out and brings me back to the login page. I havent found any implementation of such behavior in the source-code, hence i assume that this is somehow implemented by some standard tomcat routine. The problem with this behavior is, that the server sends a 302 redirect message specifying the login-Page as Location in the response-header. While this works fine for normal requests it is bad for ajax-requests, as these cannot handle 302 codes. The browser catches that one and the ajax-call has no chance to ever process the reply. I am experiencing weird cookie problems and i supsect that this might be the cause of the problem. Now, it shouldnt be hard to check whether or not a request is done by an ajax-call or not. However, i have no clue WHERE i should do so. Edit: I know that there is a way of specifying Filters and there is a way of setting up a listner that gets informed about Session-creations and destructions. However, none of these suit what i want. I need to cut in at a level that allows me to process a request, see if it is an ajax-call and then see if the session used along it is timed out and then i need to be able to decide how i respond to it. Using a filter i am BEHIND that step. I get controll when stuff regarding session timeout has happened already. Using a Session-Lifetime listner i do not have any infromation about the request. I cannot respond to anyone because i have no information about any Requests. How could i go about implementing my custom session-timeout behavior without interfering with the servers implementation?Am i even right assuming that the server automatically handles these cases? It feels kind of odd that the server knows that it has to logg someone out and also knows what to redirect to. Thanks in advance If there are any questions regarding mine ... ask away
  4. I have the need to have custom JSP tags in my web application.My custom tag works well when I run the application.Since I use Ajax (Javascript + Servlet + JSON) i tried to create my custom tag as a DIV element child in my Ajax Callback function.I tried using innetHTML method and createElement methods, and none of them works.So, I was wondering is this possible to do (or not) and how if it is?Thank You.
  5. I am trying to cURL my university login page. I want users to enter their university id and pass in my website, my website will curl to university website, authenticate and then allow them to login or give error accordingly. But my university portal is a jsp page. And after having posted in StackOverflow and other forums before, this is what I came up with. I need further help on where I am going wrong and how to rectify it. <form class="form-horizontal" action="curl.php" method="POST"> <div class="control-group"> <label class="control-label" for="inputEmail">Username</label> <div class="controls"> <input type="text" id="inputEmail" placeholder="Username"> </div> </div> <div class="control-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> <input type="password" id="inputPassword" placeholder="Password"> </div> </div> <div class="control-group"> <div class="controls"> <label class="checkbox"> <input type="checkbox"> Remember me </label> <button type="submit" class="btn">Sign in</button> </div> </div> </form> Now this is my curl.php file: <?php $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET. $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful $options = array( CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', CURLOPT_POST => true, //using post CURLOPT_URL => $address, //where to go CURLOPT_POSTFIELDS => $post, //input params CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located CURLOPT_USERPWD ==> [username]:[password]); if (strpos($content, $welcomeMessage) !== false){ /* Do whatever,I don't know what to do here though */ } curl_close($ch); //close connections ?> Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.Thank you.
×
×
  • Create New...