jump to navigation

odd dependencies between tag handlers and POJOs February 29, 2008

Posted by lemonpress in 1 cat, java web dev.
add a comment

There are odd dependencies between tag handlers and POJOs (or Java Beans) that are used by tag handlers:

if the POJO/JavaBean already exists as a compiles .class file and we created a new tag handler that uses it

The tag handler won’t compile!

Solution:

  • delete dependent .class files in the file browser
  • deselect “build a”
  • recompile the project (in Eclipse choose Project -> Build Project)

And in the future make sure that
you turned off “Build Automatically”

Reference to command line java utilities February 29, 2008

Posted by lemonpress in 1 cat, dev environment installation.
add a comment

see http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm

create compressed library archive (JAR)

jar   cf   archive_name.jar   list-of-files

jar   cf   example.jar   One.java   Two.java   Three.java

jar   cf   example.jar   *.java

jar   cf   example.jar    *

create java executable

javac  * java     compile all Java source files in the current dir

javac   One.java  Two.java  Three.java

create an executable JAR

  • create a text file that lists the “main” class e.g. mainClass.txt Main-Class: Three
  • jar  cmf   mainClass.txt   example.jar   *.class

c -    with modifications to the manifest file
m-   name jar after main class as specified within mainClass.txt
f -    including everything that matches the pattern *class

run executable JAR from command line

java   -jar   example.jar

Options

(more…)

using libraries in your project February 29, 2008

Posted by lemonpress in 1 cat, java web dev.
add a comment

xxx.jar – a library of useful classes packaged in a single archive file.

using libraries in your project is dead-easy.

  1. create classes, e.g. a collection of custom tag handlers
  2. zip them up using jar cf mytags.jar *
    or jar cf mytags.jar list-of-files.class
  3. copy mytags.jar into lib/ dir of another project (see More)
  4. use them

(more…)

Tomcat Manager February 18, 2008

Posted by lemonpress in dev environment installation.
1 comment so far

BTW: my credentials for Tomcat Manager are – admin admin

deployment on Tomcat February 18, 2008

Posted by lemonpress in dev environment installation, java web dev.
1 comment so far

Start tomcat

C:\Tomcat55\bin\tomcat5w.exe or C:\Tomcat55\bin\tomcat5.exe

check if it is running:  http://localhost:8085

Note that I set it up on port 8085 because JBoss has already taken port 8080, pluss a dozen of other ports. (Check in the notes which ports are taken – 8083…).

 Drop .war or the unpacked project folder to C:\Tomcat55\webapps

check if URL works – that will be one of the welcome-files in welcome-file-list in web.xml

useful java commands February 18, 2008

Posted by lemonpress in 1 cat, java web dev.
1 comment so far

First, navigate to the progectname dir

jar cvf projectame.war *

jar cf web-app.war *
(What’s the difference between cvf and cf?)

jar cf ear_app.ear web-app.war META-INF
(to deploy on JBoss)

* means “all files in this dir”

(more…)