Posts

Showing posts from August, 2012

Difference between Apache Server and Apache Tomcat

Apache is an HTTP server and Tomcat is a container . So Apache server can serve the  requests which are static in nature while Tomcat can serve the request which are dynamic. So if the pages are served in JSP/SERVLET then we have to use Tomcat container to interpret them. Similarly, if you will be using PHP then you need to add its support in Webserver. Webserver is used to just respond to the requests with feature such as load balancing, whereas containers( such as Tomcat) are used to manage the lifecycle of the pages generated using  JSP  and servlet.

Calling a URL with the help of HttpClient

Hi , You can call your jsp pages through HTTPClient .For that you just have to have commons-httpclient-*.jar. Any version of this jar will work. For the below code i was having commons-httpclient-3.1.jar. You can try the following lines to call your jsp page.. URL url = new URL("http://localhost/mywebapp/test.jsp")); HttpClient client = new HttpClient(); GetMethod get = new GetMethod(url.toString()); client.executeMethod(get); Other way is to make some timeout settings in Connection.For that you have to modify some connection properties like this: URL url = new URL("http://localhost/mywebapp/test.jsp"); HostConfiguration hcfg = new HostConfiguration(); hcfg.setHost(url.getHost(), url.getPort()); SimpleHttpConnectionManager connectionManager = new SimpleHttpConnectionManager(); HttpConnection connection = connectionManager.getConnection(hcfg); HttpConnectionParams conparams = connection.getParams(); conparams.setSoTimeout(timeout); conparams.setConnectionTime

org.xml.sax. SAXParseException: Element type "web-app" must be declared.

Sometime you will notice these kinds of error messsges while deploying your web application to Tomcat.  org.apache.commons.digester.Digester - Parse Error at line 22 column 18: Element type "web-app" must be declared. org.xml.sax.SAXParseException: Element type "web-app" must be declared. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1213) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1807) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3633) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1229) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:949) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org

Getting back the dropped table back in ORACLE

You can get back the dropped table in ORACLE . To do so checkout FLASHBACK command. Here is a example below : First of all create a table.I am creating  a table with name First_Table. " CREATE  table First_Table(name varchar(20),id varchar(10)) " Then DROP the table using DROP command like this: DROP table First_Table And here comes the magic command to get back the dropped table: FLASHBACK TABLE  First_Table TO BEFORE DROP ;

Project facet Java 6.0 is not supported by target runtime JBoss

This problem will come due to a mismatch over the JDK version defined in the Project Facet for that particular project and the version ,the runtime server is having. This thing worked for me  . I am having Eclipse Helios and JDK 1.5 installed .Right click on the project in Eclipse ,click the properties menu, click the Project Facets.After clicking you will see in right side some listing will come and among them one entry will be for java.So click on the java property and you will be see a drop-down box .Change the version accordingly.I have changed it to 1.5 and it worked for me. Clean the project. Hope the solution works for you.....

WAP (Wireless Application Protocol)

Wireless Application Protocol  ( WAP ) is a  technical standard  for accessing information over a mobile  wireless network .U sers can  access information instantly via  handheld wireless devices  such as mobile phones, pagers, two-way radios, smartphone and communicators.  WAP supports most wireless networks. These include CDPD, CDMA, GSM, PDC, PHS, TDMA, FLEX, ReFLEX, iDEN, TETRA, DECT, DataTAC, and Mobitex. The WAP Architecture:   Any WAP enable system consists of : a) WAP Gateway b) the HTTP Web Server c) the WAP Device Birth of  WAP :  The Wireless Application Protocol (WAP) is a result of joint efforts taken by companies teaming up in an industry group called WAP Forum. On June 26 1997 Ericsson, Motorola, Nokia, and Unwired Planet took the initiative to start a rapid creation of a standard for making advanced services within the wireless domain a reality. In December 1997 WAP Forum was formally created, and after the release of the WAP 1.0 specifications i