Jump to content
xisto Community
Sign in to follow this  
reciter

Java Servlet And Jsp

Recommended Posts

Please allow an elementary question. I am a JAVA beginner. Although it thinks that a chat will be made from servlet, is moving servlet on one's page possible? Is the place which is writing the installation method in this site? If it is, please let me know. :rolleyes:

Share this post


Link to post
Share on other sites

If you want to have a chat you can download a servlet which provides you with this option. You can put the chat everywhere you want! You must have a Servlet Container and a JSP Engine like Tomcat behind your Webserver!

<{POST_SNAPBACK}>


Buddy just go to javazoom.com you will get good stuff of chat servlet from there with doc

Share this post


Link to post
Share on other sites

I am a beginner of servlet/jsp. but i have build a function which may be very useful for a developer, i am asking Xisto for free hosting account for servlet/jsp. and i will post many source code on my free hosting account.Now i would like to post my small function which useful here. It was call navigation page it is the recordset paging which i build up myself. this one has three language. The first one is PHP, then i convert it to ASP, Now i convert it to Servlet/JSPpublic String navigation(int totalrow,int start,String referer) { String result=""; int totalpage=0; int previous=0; int snext=0; int pageleft=0; int sdnbp=0; int sdnap=0; int ddpp=20; int dnbp=10; int dnap=10; if ((totalrow % ddpp) == 0) { totalpage = totalrow/ddpp; } else { totalpage = totalrow/ddpp + 1; } if (totalrow < ddpp) { result+="Page 1"; } if (totalrow > ddpp) { if (start==1) { result+=" "; } if (start!=1) { previous=start-1; result+="<a href="+referer+"?start="+previous+">[Previous]</a>"; } if (start < dnbp) { sdnbp=1; } if (start == dnbp) { sdnbp=start-dnbp+1; } if (start > dnbp) { sdnbp=start-dnbp; } for (int i=sdnbp;i<= start-1;i++) { result+="<a href="+referer+"?start="+i+">["+i+"]</a>"; } result+="["+start+"]"; pageleft=totalpage-start; if (pageleft < dnap) { sdnap=start+pageleft; } if (pageleft == dnap) { sdnap=start+pageleft; } if (pageleft > dnap) { sdnap=start+dnap; } for (int i=start+1;i<=sdnap;i++) { result+="<a href="+referer+"?start="+i+">["+i+"]</a>"; } if (start == totalpage) { result+=" "; } else if (start < totalpage) { snext=start+1; result+="<a href="+referer+"?start="+snext+">[Next]</a>"; } result=result; } return result; }Please enjoy my code.Thanks & Best Regards,Dorei

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.