Heap size and Eclipse
To increase heap size of eclipse editor, modify eclipse.ini file to the values you need -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
Tech Tips and Tricks
To increase heap size of eclipse editor, modify eclipse.ini file to the values you need -vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
Fedora can be installed using a local network (or even over the Internet if you have broadband access). You will need access to a Web, FTP, or NFS server hosting the installation packages. To boot to a network install, use Continue reading Installing Fedora Using a Network
[eg. of web.xml <web-app> <servlet> <servlet-name>ReadInitParams</servlet-name> <servlet-class>com.company.MyServlet</servlet-class> <display-name>Example Servlet</display-name> <init-param> <param-name>emailHost</param-name> <param-value>192.168.1.1</param-value> </init-param> </servlet> </webapp> In Servlet Code: public void init(ServletConfig config) throws ServletException { String emailHost = config.getInitParameter(“emailHost”); } or public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Continue reading Read The Init-Params Defined In The web.xml
The difference between getAttribute() and getParameter() is that getParameter() will return the value of a parameter that was submitted by an HTML form or that was included in a query string. getAttribute() returns an object that you have set in Continue reading Difference between request.getParameter() and request.getAttribute()
If Tomcat was not bundled as part of an operating system distribution, it won’t have the necessary file(s) to start automatically at system boot time. This describes the steps that should be taken to start Tomcat automatically after Linux boots. Continue reading Starting Tomcat automatically after Linux boots.
To copy a file, you can use the following command: copy source.txt destination.txt To run this in Java, String[] cmd = {“copy”,”source.txt”,”destination.txt”} Runtime.getRuntime().exec(cmd); This may generate error=2. To fix this, use the complete path of copy.exe eg. C:\Windows\System32\copy.exe
select * from ( select a.*, rownum rnum from ( YOUR_QUERY_GOES_HERE — including the order by ) a where rownum <= MAX_ROWS ) where rnum >= MIN_ROWS
If you use Hibernate in a managed environment (with JBoss or some other AS that Hibernate supoorts). Add this line to session-factory section: <property name=”hibernate.current_session_context_class” >jta </property> If you use Hibernate in a non-managed environment (standalone application with JDBC). Add Continue reading Hibernate gives “No CurrentSessionContext configured” error
Use sed -e ‘s/^M//g’ file where ^M is the crtl-m character normally inserted by typing Ctrl-V Ctrl-M Alternatively, grab dos2unix from somewhere.
To make a SAMBA share “Public” so that whether or not user have an account on the server, be able to access the share, add the following in the Global setting: map to guest = Bad User And have the Continue reading Samba Public share