www.webdeveloper.com

Search:

Type: Posts; User: JavaServlet

Page 1 of 5 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    2,643

    Try this: ...

    Try this:


    <servlet>
    <servlet-name>servletName</servlet-name>
    <jsp-file>/yyy.jsp</jsp-file>
    </servlet>

    <servlet-mapping>
    <servlet-name>servletName</servlet-name>
  2. Swing should help you with what you need to...

    Swing should help you with what you need to achieve. Look at JFrame and IO classes.
  3. Replies
    4
    Views
    2,643

    Use servlet-mapping in your web.xml. Servlet...

    Use servlet-mapping in your web.xml.

    Servlet example:


    <servlet>
    <servlet-name>YourServlet</servlet-name>
    <servlet-class>YourServletClass</servlet-class>
    </servlet>
  4. If your doing presentation layer only you should...

    If your doing presentation layer only you should play around with css and form layouts. For the back end and processing of records you should get familiar with databases and MVC pattern.
  5. Replies
    2
    Views
    1,990

    Use File listFiles() and a comparator to sort...

    Use File listFiles() and a comparator to sort your array by last mod date.
    Apache Commons IO package has LastModifiedFileComparator that you can also use.

    listFiles() example to help get you in...
  6. Replies
    1
    Views
    1,347

    Your question is related to JavaScript not Java. ...

    Your question is related to JavaScript not Java. Try the JavaScript function toString(16).

    Here is something that should give you direction:


    function dec2Hex(i)
    {
    var myValue =...
  7. Replies
    1
    Views
    2,748

    Sounds like something you would want to do with...

    Sounds like something you would want to do with AJAX where you can use XML and JSON. Look at Open Java Trading System (OJTS) to provide additional guidance.
  8. Replies
    3
    Views
    4,188

    Your using session object so you need to change...

    Your using session object so you need to change request to session in your JSP and it should work. I would refrain from using Scriptlets as they are outdated technology in JSP.
    See below example...
  9. Replies
    3
    Views
    968

    Here is something with MySQL that should guide...

    Here is something with MySQL that should guide you in the right direction:


    select city, state, '=', group_concat(zip SEPARATOR ' ') as zips, ',' from Table1 group by city into outfile...
  10. Several options if you have quote issues would be...

    Several options if you have quote issues would be to create a class to escape the values or create a custom tag if needed or use EL.

    EL example:
    ${fn:replace(param.YourFieldName, "\"", "\\\"")}
    ...
  11. Here is one way to do it where you can read your...

    Here is one way to do it where you can read your file and count any opening and closing div tags.



    import java.util.Scanner;
    import java.io.*;

    public class DivCount {
    public static...
  12. Replies
    2
    Views
    3,312

    Use EL and not scriptlet for fetching parameters...

    Use EL and not scriptlet for fetching parameters in JSP.

    Form example:


    <select name="StartTimes" id="StartTimes" onblur="CheckTimes('StartTimes','EndTimes')">
    <script...
  13. Replies
    6
    Views
    6,106

    Use an outer join in your SQL.

    Use an outer join in your SQL.
  14. Replies
    4
    Views
    4,357

    Its an Up Key event on the frame that can be used...

    Its an Up Key event on the frame that can be used for example in JFrame.
  15. Replies
    4
    Views
    4,357

    Why are you not using KeyEvent.VK_UP in that part...

    Why are you not using KeyEvent.VK_UP in that part of your program?
  16. Your code should not compile due to try block...

    Your code should not compile due to try block bracket issue. You need to eliminate the bracket before the in.close() part.

    It looks like you have other issues and maybe you are not showing all...
  17. Replies
    1
    Views
    1,411

    Probably because your JAVA_HOME environment...

    Probably because your JAVA_HOME environment variable not set, or set incorrectly.
    It should point to your java directory.
  18. Eliminate scriptlet because that is outdated and...

    Eliminate scriptlet because that is outdated and use JSTL/EL in your presentation layer.

    You should create a list to fetch from database and run it through your servlet then get the saved value...
  19. Replies
    1
    Views
    1,165

    Check the filter API. Look at the Filter,...

    Check the filter API. Look at the Filter, FilterChain, and FilterConfig interfaces.
  20. What is the Exception message you are getting?...

    What is the Exception message you are getting?
    Are you writing directly (unbuffered) to a FileWriter?
  21. Replies
    1
    Views
    977

    Create session with HttpSession object and then...

    Create session with HttpSession object and then write to file.
    View below to get you started:



    HttpSession session = request.getSession();
    session.setAttribute("yourSessionData",...
  22. Replies
    1
    Views
    1,068

    There is no native member variable or field in...

    There is no native member variable or field in the Java. You can access Java object fields from native code, or you can associate native language objects with Java objects by various techniques.
    ...
  23. Both are good Collection classes. HashTable is...

    Both are good Collection classes. HashTable is synchronized where it can be used concurrently by multiple processes/threads without need for synchronization outside of the object. HashMap is not and...
  24. Replies
    1
    Views
    981

    Why spaces in your url and what message do you...

    Why spaces in your url and what message do you get?
    I assume you set classpath with your servlet-api.jar location.
  25. Replies
    1
    Views
    1,296

    You should use a Java XML library to convert the...

    You should use a Java XML library to convert the collection to an InputStream.
    From there you can use JSTL to output in JSP.
Results 1 to 25 of 102
Page 1 of 5 1 2 3 4
HTML5 Development Center



Recent Articles