Search Results

Search found 226 results on 10 pages for 'nitesh jain'.

Page 7/10 | < Previous Page | 3 4 5 6 7 8 9 10  | Next Page >

  • I want to design a html form in python

    - by VaIbHaV-JaIn
    when user will enter details in the text box on the html from <h1>Please enter new password</h1> <form method="POST" enctype="application/json action="uid"> Password<input name="passwd"type="password" /><br> Retype Password<input name="repasswd" type="password" /><br> <input type="Submit" /> </form> </body> i want to post the data in json format through http post request and also i want to set content-type = application/json

    Read the article

  • KeyError this says that key(partner) is not in dict ?

    - by Ansh Jain
    I am trying to make an chat application using python and django. I almost complete it and its working fine for 8-10 minutes when two persons are chatting after that certain time it shows an error. here is the traceback : - Traceback (most recent call last): File "\Django_chat\django_chat\chat\views.py", line 55, in receive message = chatSession.getMessage(request.session['partner'],request.session['uid'],afterTime) File "C:\Python26\lib\site-packages\django\contrib\sessions\backends\base.py", line 47, in __getitem__ return self._session[key] KeyError: 'partner' here is the receive module :- def receive(request): message received by this user chatSession = chat() data = request.POST afterTime = data['lastMsgTime'] try: message = chatSession.getMessage(request.session['partner'],request.session['uid'],afterTime) except: #partnerId = virtual_users.objects.get(id=request.session['uid']).partner print('there is an error in receive request') traceback.print_exc(file=open("/myapp.log","a")) msg = serializers.serialize("json", message) return HttpResponse(msg) Please Help me :( thanks Ansh J

    Read the article

  • How do i access EJB implementing remote interface in separate web application?

    - by Nitesh Panchal
    Hello, I am using Netbeans 6.8 and Glassfish v3.0. I created an ejb module and created entity classes from database and then created stateless session bean with remote interface. Say eg. @Remote public interface customerRemote{ public void add(String name, String address); public Customer find(Integer id); } @Stateless public class customerBean implements customerRemote{ //implementations of methods } Then i created a new web application. But now how do i access remote ejb's in my web application. I could lookup a bean with jndi name but what i want to know is, what type of object it will return? How do i typecast it in customerRemote? I don't have any class named customerRemote in my web application. So, how do i do it? Also, what about the entity class Customer? There is no such class named Customer in my web application also. All ejb's and entity classes are in separate ejb module. Please help me :(

    Read the article

  • Please help me with Red5 server

    - by Nitesh Panchal
    hello, I have installed Red5 server successfully and also am able to run the demos fine. Now, I want to create a sample red5 server application. I created a sample project according to the specific directory structure that Red5 requires. But, now when i try to open this project in Netbeans 6.8, i am unable to because both have a different directory structure. So, Netbeans doesn't consider it as a project. I actually want to convert this project to a war file, so i can deploy it to red5/webapps directory and then red5 deployer service can make project out it automatically. How do i convert this project to a war file? because in Netbeans i am unable to open it. Please help. Thanks in advance :)

    Read the article

  • Servlet Security question about j_security_check, j_username and j_password

    - by Nitesh Panchal
    Hello, I used jdbcRealm in my web application and it's working fine. I defined all constraints also in my web.xml. Like all pages of url pattern /Admin/* should be accessed by only admin. I have a login form with uses standard j_security_check, j_username and j_password. Now, when i type Admin/home.jsf it rightly redirects me login.jsf and there when i type the password i am redirected to home.jsf. This works alright but problem comes i directly go to login.jsf and then type password and username. This time it again redirects me to login.jsf. Is there any way through which i can specify which page to go when successful login is there? I need to specify different different pages for different roles. For Admin, it is /Admin/home.jsf for general users it is /General/home.jsf because login form is shared between different type of users. Where do i specify all these things? Secondly, i want to have a remember me checkbox at the end of login form. How do i do this? By default, it is submitted to j_security_check servlet and i have no control over its execution. Please help. This doesn't seem so hard but looks like i am missing something.

    Read the article

  • How does this iterative Tower of Hanoi work? C

    - by Nitesh Panchal
    Hello, while surfing google, i found this interesting solution to Tower Of Hanoi which doesn't even use stack. Can anybody explain me in brief, what is it actually doing? And this solution really acceptable? #include <stdio.h> #include <stdlib.h> int main() { int n, x; printf( "How many disks? " ); scanf( "%d", &n ); printf("\n"); for (x=1; x < (1 << n); x++) printf( "move from tower %i to tower %i.\n", (x&x-1)%3, ((x|x-1)+1)%3 ); return 0; }

    Read the article

  • How do i solve A datatable problem in JSF

    - by Nitesh Panchal
    I have a databale on index.xhtml <h:dataTable style="border: solid 2px black;" value="#{IndexBean.bookList}" var="item" binding="#{IndexBean.datatableBooks}"> <h:column> <h:commandButton value="Edit" actionListener="#{IndexBean.editBook}"> <f:param name="index" value="#{IndexBean.datatableBooks.rowIndex}"/> </h:commandButton> </h:column> </h:dataTable> My bean :- @ManagedBean(name="IndexBean") @ViewScoped public class IndexBean implements Serializable { private HtmlDataTable datatableBooks; public HtmlDataTable getDatatableBooks() { return datatableBooks; } public void setDatatableBooks(HtmlDataTable datatableBooks) { this.datatableBooks = datatableBooks; } public void editBook() throws IOException{ int index = Integer.parseInt(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("index").toString()); System.out.println(index); } } My problem is i always get the same index in server log even though i click the different edit buttons, Imagine that there is one collection which is supplied to the datatable. I have not shown that in bean. If i change scope from ViewScope to RequestScope it works fine. What can be the problem with @ViewScoped? Thanks in advance :)

    Read the article

  • How do i set the Transaction Isolation in EJB?

    - by Nitesh Panchal
    Hello, I am not able to find a way to set TransactionIsolation in ejb. Can anybody tell me how do i set it? I am using persistence. I have looked the following classes : EntityManager , EntityManagerFactory, UserTransaction. None of them seems to have any method like setTransactionIsolation or such. Do we need to change persistence.xml? I just read a book named Mastering EJB 3.0 4th edition. They gave a full 10 page theory about Isolation level that this problems occur and that occurs and such things but at the end they gave this paragraph :- "As we now know, the EJB standard does not deal with isolation levels directly, and rightly so. EJB is a component specification. It defines the behavior and contracts of a business component with clients and middleware infrastructure (containers) such that the component can be rendered as various middleware services properly. EJBs therefore are transactional components that interact with resource managers, such as the JDBC resource manager or JMS resource manager, via JTS, as part of a transaction. They are not, hence, resource components in themselves. Since isolation levels are very specific to the behavior and capabilities of the underlying resources, they should therefore be specified at the resource API levels. " What exactly does it mean? What is meant by resource level APIs? Please help me. If persistence has no way to set Isolation Level then why do they give such huge theory in an EJB book and make it heavy in weight unnecessarily :(

    Read the article

  • How do i integrate paypal in my website? Java

    - by Nitesh Panchal
    Hello, I want to integrate paypal in my java web application. I saw that they offer many methods to accomplish this. But i want my visitors to remain on my site only. My friend told me that Paypal offers webservice. But i can't seem to find any documentation on Paypal site. If anybody could help me with this, i would be really very grateful. Please offer me the relevant links on Paypal where i could read and get my things done. Secondly, my friend also told me that we need to give location to paypal where my visitors would be redirected once paypal payment is complete. But i am confused. I am working on localhost. How would Paypal know about my localhost? I have already created my sandbox testing account. What should be my next step. Please explain me in detail. I don't know anything about Paypal. Once i created a demo application of Express checkout where they give a simple button of Pay Now and on clicking on it shopping cart etc appears. But now i want my visitors to stay on same website. Thanks in advance :)

    Read the article

  • A beginner's JSF question about form validation

    - by Nitesh Panchal
    Hello, I am having a form and many input elements in that. I want certain fields to be validated, so i keep validateLenth etc on those. And i want some fields to not be validated. For example, i have contact information and address information both on the same page. I want to treat contact information as one group. So if some fields are invalid they should not be submitted and address information to be independent of contact information. Thus, if address information is corrected it should be submitted. I have one form only on the page but two buttons, one for address and one for contact. Simply put :- What is the equivalent of validationGroup of Asp.Net in JSF?

    Read the article

  • access dropdown control from the master page to the content page using asp.net

    - by Isha Jain
    i have a master page and the content pages in the master page i have the textbox and dropdown the value in the dropdown may vary according to the content pages e.g for one content page the dropdown may contain branchname, city, address and let for other content page under same master page the dropdown may have values like Contactnumber, EmailID, ........... ......... etc..... so please help me to how can i bind that dropdown from my content page thanks.

    Read the article

  • Where should i save my images that user uploads? java web application

    - by Nitesh Panchal
    Hello, I am saving the image at this location :- private static String photoGalleryPath = "/Common/PhotoGallery/"; In PhotoGallery. I create userid wise folders and save images. Everything works fine. But when i clean and build my project. The whole folder of PhotoGallery gets deleted. This looks very funny to me :). Why does it delete my whole folder everytime? And what more should i do to tell the extra smart Glassfish to not to delete my folders?

    Read the article

  • Difference between following arrays?

    - by jayesh jain
    This is ARRAY1 var array_1 = ["51b59c162de88", [ ["parties", 0.0, 0.011] ]] ["51b59c1b4f52f", [ ["star-speak", 0.0, 0.006], ["parties", 0.0, 0.011] ]] This is ARRAY2 var array_2 = [{ key: "51b59c162de88", values: ["parties", 0.0, 0.011]] }, { key: "51b59c162de94", values: [ ["star-speak", 0.0, 0.006], ["parties", 0.0, 0.011] ] }, ]; What is the exact difference between array 1 and array 2. How do I access their data? I am new to json!!!!

    Read the article

  • Simple Question:Output of below Java program

    - by Abhishek Jain
    public class abc1 { private String s; public abc1(String s){this.s=s;} public static void main(String args[]) { HashSet<Object> hs=new HashSet<Object>(); abc1 a1= new abc1("abc"); abc1 a2= new abc1("abc"); String s1= new String("abc"); String s2= new String("abc"); hs.add(a1); hs.add(a2); hs.add(s1); hs.add(s2); System.out.println(hs.size()); } } Why above program output is 3?

    Read the article

  • Same loop giving different output. Java IO

    - by Nitesh Panchal
    Hi, I am facing a very strange problem where the same loop keeps giving me different different output on change of value of BUFFER final int BUFFER = 100; char[] charArr = new char[BUFFER]; StringBuffer objStringBuffer = new StringBuffer(); while (objBufferedReader.read(charArr, 0,BUFFER) != -1) { objStringBuffer.append(charArr); } objFileWriter.write(objStringBuffer.toString()); When i change BUFFER size to 500 it gives me a file of 7 kb when i change BUFFER size to 100000 it gives a file of 400 kb where the contents are repeated again and again. Please help. What should i do to prevent this?

    Read the article

  • How do i get file path of my file in java enterprise application?

    - by Nitesh Panchal
    Hello, I created java enterprise application and it consists of ejb module and web application. I have plain old xml file in source packages folder in package "common" in my ejb module. I want to pass this file path in File() constructor for one class in ejb module. How do i do it? If i pass any of the below it doesn't work :- new File("abc.xml"); //this take file from glassfish/domains/domain1 :( new File("./abc.xml"); I don't want to pass hardcode path like /home/administrator/appname/module/etc.. I want the path relative from my ejb module. Please help me. I've tried all things. Actually when i created a class in same folder and then try classname.getResource("abc.xml").getPath() it works fine. But what if i don't have any class in that folder. Waiting for your replies

    Read the article

  • How to display image in Swing? in textarea?

    - by Nitesh Panchal
    Hello, I am creating a chat application using JApplet. I have a TextArea where all chat messages go. Everything in working fine and smooth just as you would expect a basic chat application to do. Now i want to add support for gestures. I wanted to know, how can we show an icon in textarea? it only takes string in append() method. Thanks in advance :)

    Read the article

  • A very strange problem -> CSS file not detected .Java web application

    - by Nitesh Panchal
    Hello, If i browse my site using http://localhost:8080/abc/Login/index.jsf, everything works fine. But if browse it using simply http://localhost:8080/abc, the page is shown but all its images and css files are missing. What can be the problem? I have this in my web.xml :- <form-login-config> <form-login-page>/Login/index.jsf</form-login-page> <form-error-page>/Login/index.jsf</form-error-page> </form-login-config> Probably, images are not getting referenced correctly. Can anybody help me? I have referenced css file as follows :- <link href="./Css/MainStyleSheet.css" rel="stylesheet" type="text/css" /> where Css is folder in Login

    Read the article

  • A beginner's log4J question

    - by Nitesh Panchal
    Hello, i configured log4j for basic purpose usin the conversion pattern :- log4j.appender.rollingFile.layout.ConversionPattern=%p %t %c - %m%n But now i want to log the class name from which the error came as well as the username(available in session object) as well as the date and time when that event occurs. How do i do this? What changes do i need to make in format string? Thanks in advance :)

    Read the article

  • How to get rid of library references problem? Java

    - by Nitesh Panchal
    Hello, I created a web application and it used several libraries once upon a time. So i added them but later on i found alternative and actually better ways to do the same things. So i removed references from my project for those jars and libraries. Everything works fine but when i move the same project to my friend's laptop Netbeans 6.8 simply doesn't let me deploy the project and gives the whole bundle of errors of libraries that i used previously but i don't now. I removed all references from build.impl file and then when i deploy it, it works fine. But when i do a clean and build and try to deploy it, build.impl automatically again adds those lines of xml which contain references to libraries an again gives me a whole long list of errors. How do i get rid of this? I am really tired of these silly errors. Thanks in advance :)

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10  | Next Page >