Hussam Bamatraf

Greenhorn
+ Follow
since Aug 25, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hussam Bamatraf

This depends on the application server. For example, Tomcat creates a servlet class login_jsp.class for login.jsp. The servlet is created in org.apache.jsp package. You can find that package in:
<tomcat-root>\work\Catalina\localhost\<your-application-name>\
16 years ago
JSP


<jsp:useBean id="idHandler" class="user.login" scope="request">


In the above line, the class name is not correct. It should be . [Notice the capital letter L].
17 years ago
JSP
Can you post the question JSP page code?
It seems there is some code at the end of that JSP raises the 500 Internal Server Error.
17 years ago
If you need job scheduling mechanism, try Quartz


Sample uses of job scheduling with Quartz:

  • Driving Workflow: As a new order is initially placed, schedule a Job to fire in exactly 2 hours, that will check the status of that order, and trigger a warning notification if an order confirmation message has not yet been received for the order, as well as changing the order's status to 'awaiting intervention'.
  • System Maintenance: Schedule a job to dump the contents of a database into an XML file every business day (all weekdays except holidays) at 11:30 PM.

  • 17 years ago
    The problem is that you didn't initialize repCriteria array before using it:

    You should initialize the array:
    17 years ago

    You should not use request.getRealPath() with absolute path (E://REPORT//test.txt) because it is already real full path.
    You use request.getRealPath only if you have file relative to your web application folder. By the way, this method is deprecates and you should use ServletContext.getRealPath() or application.getRealPath() from your JSP.
    17 years ago
    JSP
    Tomcat can reload your servlets if there is any change by specifying reloadable attribute to true in the Context element in server.xml file or your web application configuration file.
    For example, go to <tomcat_home>\conf\Catalina\localhost\ and locate your_application_name.xml file (if your application config file is not listed here you can check for the <Context> attribute inisde server.xml file or create a new file with your application name inside <tomcat_home>\conf\Catalina\localhost\ folder), then add reloadable="true" as following:

    if you create a new file configuration the above script is enough.
    Please be warned the reloadable web application is much slower; therefore, it is not suitable for production use (use it for development stage only).
    17 years ago
    Check Web Tools Platform project for Eclipse at the following URL:
    http://www.eclipse.org/webtools/main.php
    One of the subprojects of this project is Java Server Faces Tools (JSF):
    http://www.eclipse.org/webtools/jsf/main.php
    17 years ago
    JSF
    You can easily add a parameter in the forwarded request to specify which action to execute, for example, use the following URL to forward to your servlet if you want to execute the add() method:
    /MyServlet?action=add

    Then inside the servlet's doGet() method retrieve the value of the action parameter to decide which method to call:


    I hope this will help you.
    17 years ago
    NetBeans provides excellent out of the box support for JSF, no need to search for plugins (as in eclipse).
    Check the following flash demos URL to see what NetBeans provides for JSF:
    http://www.netbeans.org/download/flash/netbeans_55/vwp_ws/vwp_ws.html
    http://www.netbeans.org/download/flash/why-netbeans-part2/player.html

    I have tried Eclipse several times in the past but I alway return to NetBeans.
    17 years ago
    JSF
    This allows the Spring container to inject the required object by reading the proper class name from beans configuration file.
    This is called "Depenedency Injection" where your class is not responsible to create its associated objects. Another concept here is "Decoupling": this means you use the interface (not the actual implementation) to decalre you class fields. This is important because you may have different implementations of the same service interface, therefore, you don't couple your class with one implementation. For example, insted of using:


    Use:


    Spring container allows you to inject the actual implementation using beans configuration file.
    Go to the following link http://www.javaranch.com/drive/jdbc/index.jsp
    to know how to read MySql database using java.
    19 years ago
    You can get the the language preferred by an HTTP client by parsing the Accept-Language header of HTTP protocol. Example of this header:
    Accept-Language: en-US; q=1.0, en;q=0.5
    This header indicates that the user prefers American English (quality 1.0) but will take any form of English as an alternative (qualiity 0.5).
    You can write a servlet to do internatinalization and direct user to a page according to their langauge preference.
    19 years ago
    for starting learning jsp,servlet and strut tomcat is enought. However, for ejb and other advanced j2ee features move to weblogic or jboss(open source j2ee server).
    Best wishes,,,
    20 years ago