patch.diff file not working with CSS file - eclipse

I am using eclipse svn to maintain version for developing java web application with spring and hibernate.
Now i am creating patch now try to applying that patch. My patch is working well with .java and .jsp files but it is not working with .css file.
I have seen that patch successfully created file for .css but it is not applying.
Please help me to solve this issue?

Related

Bring back the original project from a WSDL file or a WAR file

We have lost our java code that implement a web service. Now we have only a wsdl file (and a WAR file) published in tomcat. We need to bring back the original java project so I have tried to generate java source code from WSDL file (and WAR file) and I succeeded -by using axis2 (WSDL2JAVA) plugin- but I think it generates only the java classes that should exist in the src package of the project.. no welcome pages or index.xml etc.. I Don't know what other things are missing and how to bring them back.
My question is: what to do after generating java classes from WSDL file? should I complete the other project parts in my own? Is there a way to bring back exactly the original project from WSDL or WAR file?
As per the Scenario you mentioned for WAR file you can use JAD tool to unpack the whole code but with certain limitations like you cannot edit or save the code and I am not sure about the copy feature because it was not working for previous version.
Here is the link below.
https://varaneckas.com/jad/

Eclipse WebLogic exploded deployment republish only JSP on file change

I'm using Eclipse with WebLogic extensions.
I'm developing my J2EE application as Exploded. Each time I modify a JSP file content it is copied automatically inside the exploded deployment folder.
Unfortunately this scenario works only for JSP files, any other project file, like CSS and JS, must be copied by hand.
Is it possible to tell Eclipse to auto deploy other file types too?
Thanks!

How do you change a NetBeans project type after it has been created?

I created a project from existing sources as a PHP project in an older version of NetBeans.
I now want to change the project type to an HTML5/CSS project in NetBeans 7.4.
Is there any easy way to change the type of an existing project in NetBeans?
I'm trying to avoid creating a new project from existing sources as I have all my server connection variables already configured.
The project data is stored within the main project directory in a subdirectory named nbproject.
The file project.xml contains the main configuration data for the TYPE of the project. The type and data xml namexspace settings determine the basic project type. Here is a PHP version:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>codex-slp</name>
</data>
</configuration>
</project>
Here is an HTML5 project version:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>csa</name>
</data>
</configuration>
</project>
Note the line is different. The HTML 5 project uses the namespace org.netbeans.modules.web.clientproject. The PHP version is at org.netbeans.modules.php.project.
Also of note is the data xmlns entry with HTML5 pointing to the clientside-project directory while PHP points to the php-project directory.
How to change the project? Not easily. Your best bet:
Close out the NetBeans IDE.
Go to the project directory.
Remove (or rename) the nbproject subdirectory.
Open NetBeans.
Create a new HTML5 project from existing sources.
That will switch the project type from PHP to HTML5 and give you the corresponding dialogue boxes.
The reason I decided to take this approach is there are a lot of other things that hang off this namespace specification. The project.properties file, for example, has very different entries for a PHP project, thinks like the PHP version, that do not exist for the HTML5 project. The HTML5 project has new properties that are not present in PHP projects.
There is also an entire private subdirectory that has a plethora of options set in the private.properties file that contains things like the source remote connection for a PHP project that does not exist nor seem to even be SUPPORTED for an HTML5 project.
There are far too many disparities between the two project types to simply hack up the nbproject directory files and hope it works.
IMO your best option is to follow the steps above to recreate the project.
Sadly, it does not appear as though HTML5 project types have matured to the point of the PHP project types with things like supporting remote pull/push of changed files. For this particular project I've reverted back to the PHP project type even though this is not really a PHP project. I heavily rely upon the automatic remote server push via FTP. How did I restore the project? I renamed my nbproject directory to saved_nbproject, so to revert:
Close Netbeans.
Go to project directory.
Rename my saved_nbproject directory back to nbproject.
Restart NetBeans.
Maybe changing project types AND HTML5 remote server support will be available in the future. For now, with NetBeans 7.4 it does not appear this transition is readily available.
If anyone else has input or other feedback I'd love to hear it as NetBeans has become my go-to tool for complex code projects.
NOTE: I would strongly suggest to create a new project from existing sources to ensure everything will work as expected. In most cases its faster and less problematic.
(If you persist....)
Following the accepted answer may result in an error. Besides what Charleston Software Associates posted, you may need to copy other variables included in "project.properties" file.
For example, these are for PHP: (adjust properly. I suggest to see some of your other projects to prevent mistakes).
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_create_2e_tests=false
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.test_2e_run_2e_all=false
ignore.path=
include.path=
php.version=PHP_53
source.encoding=UTF-8
src.dir=/var/www/example
tags.asp=false
tags.short=false
web.root=.
These are for HTML5:
auxiliary.org-netbeans-modules-css-prep.less_2e_compiler_2e_options=
auxiliary.org-netbeans-modules-css-prep.less_2e_enabled=false
auxiliary.org-netbeans-modules-css-prep.less_2e_mappings=/less:/css
auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options=--style compressed
auxiliary.org-netbeans-modules-css-prep.sass_2e_configured=true
auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=true
auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css
auxiliary.org-netbeans-modules-javascript2-requirejs.enabled=true
auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=js
config.folder=${file.reference.example-config}
file.reference.example-config=config
file.reference.example-test=test
file.reference.www-example=/var/www/example
files.encoding=UTF-8
site.root.folder=${file.reference.www-example}
test.folder=${file.reference.example-test}
You can mix both in a single file without any problem.
Using: Netbeans 8.0.1
Try to edit your project.xml replace type with
<type>org.netbeans.modules.web.clientproject</type>
Guys this has changed for version 7.4?
in private.properties
remote.connection=remotename
remote.directory=/public_html/
remote.upload=ON_SAVE
run.as=REMOTE
url=http://remotename.com
I tried changing xml and that didn't work well for me. I fiddled around and found a way that seems simpler to me - just delete and create a new project!
Right click the project in netbeans, and click delete. (make sure to NOT check the box that says delete sources!). That clears out the netbeans project info. Then just make a new project of whatever type you want. Go to File->New Project. Select project type (in this case HTML5 Project with existing sources), making sure to select the one that has "with existing sources". Hit next. Now here is a key part. The site root is your mysite/public_html folder most likely. The project directory is your mysite folder. The netbeans config will be put in the mysite folder.
Then you should be good to go!
Close Netbeans.
Delete nbproject folder inside your app folder. It can be hidden folder , so , in windows, go to folder properties and activate hidden folder.
Reopen Net Beans. Create a new project of the correct type.

Eclipse: Remove unused files

I have android code with many different java, bmp and xml files everywhere in my project that I used during the drafting phase of my project.
Is there any way you can get eclipse to just delete all files in your project not being used at all? Or do I have to do it manually?
Thanks.

Custom tag file code assist not working in Eclipse but working in IntelliJIDEA

I am new to JavaEE but struggling hard to learn it.
I noticed one thing which is not working that is Code Assist in Custom Tag files in Eclipse. Same working in IntelliJIDEA current version. Both screen shots below.
Someone help me to enable Code Assist in Eclipse Indigo Service Release 2.
Edited
NetBeans & Esclipse don't show code assist for custom classes when I type ${user.} which is EL. Only IntelliJIDEA supports that.
Eclipse
IntelliJIDEA
JAR files
1) Try Window / Preferences / Web / JSP Files / Editor / Content Assist.
Make sure the HTML and XML Tag Proposals checkboxes are checked.
2) Can you specify it as a taglib instead of a tag import?
<%# tablib prefix="user" uri="/WEB-INF/tags/User.tld" %>
3) Do you have the right libraries in the classpath?
Enabling content assist for JSP files
Having the proper files defined in the Java™ build class path is essential for content assist to work properly in JSP files. It is also essential for the links builder to be able to correctly resolve links to servlets or Java beans in JSP and HTML files.
To enable content assist for JSP files:
To determine whether the build path is correct, select Properties from the
project's pop-up menu. Select Java Build Path, and then the Libraries page. You should see the following files:
j2ee.jar
rt.jar
servlet.jar
webcontainer.jar
If they are not present, add them as External JAR files. You may have your own versions of these files, depending on the level of JDK or Servlet API for which you are developing. If your Web applications reference other JARs, you can place them in the build path as follows:
Use the Add JARs button on the Library page.
You must ensure that the JAR file is available to the server by properly
configuring the server.
Add the JARs to the WEB-INF/lib directory.
They will be automatically added to the build path and deployed to the
server in as part of the project WAR.