john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

java webapp upgrade hack

tar -czvf the authgateway directory
copy and extract into temp directory
decompile the .class files into .java files
create a new eclipse dynamic web project
create the folder structure in the project's workspace to match the package lines (com -> domain -> etc. )
copy all of the .java files into the new package/directory structure as appropriate
eclipse -> right click on the project name and choose to refresh
create a lib folder in the project's workspace
copy all of the .jar files from the original application's lib directory
right click on the eclipse project and choose "Build path" -> Add jar's
add each jar which relates to errors in import lines in the .java source (i.e. log4j-1.2.16.jar)
fix one line of code that incorrectly had the "throw" statement outside of the catch{} block
eclipse -> export the project as a .war
java -xvf projectname.war
copy the only updated .jsp / .class files into the (backed up) original project
restart tomcat
testing included password with: ~!@#$%^&*()_+-=aA (shouldn't matter for unicode)

  • « javascript servlet simple polyalphabetic encrypt example
  • Linux raise ulimit permanently »

Published

Aug 1, 2011

Category

java

~168 words

Tags

  • hack 1
  • java 252
  • upgrade 7
  • webapp 2