Source not found

Source: Internet
Author: User

In myeclipse 6.5 attach source, it is not found if it does not match the version. I did not understand the CVS. SRC is not complete. It's late. Continue tomorrow.

Cannot find Bean: "org.apache.struts.taglib.html. Bean" in any scope

In most cases, the control you bound is not placed in the <HTML: Form> tag.

 

 

 

Myeclipse: Change the default encoding of new files in myeclipse or eclipse.

Eclipse:

The right window of window-preferences-General-contenttype can be changed to GBK or UTF-8.

Myeclipse:

Window-preferences-myeclipse-files and editors-JSP inside encoding, change here to iso000046/UTF-8.

Eclipse and Java file encoding settings

If you search for file encoding problems on the Internet, you can get a lot of answers, or even some are known as the ultimate solution, so you may not encounter Encoding Problems. Why should I write this article? Because I work under two platforms, the default encoding is different, so you need to skip it.

Let's take a look at the eclipse settings. If you download eclipse and do nothing, you can start to create a project and code. Everything is okay, however, you may have moved your project to Linux for development, because you are getting tired of WINXP and fall in love with ubuntu. This is the case. Open eclipse under WINXP, click window --> preferences, and expand general --> workspace. The text file encoding on the left is not displayed. The default setting is simplified Chinese encoding (GBK, gb2312), and Linux below, is the UTF-8.

Now everyone has understood their differences, what are you waiting for, and now start to set all your workspace file encoding to UTF-8, you will have a Java file that can be normally displayed at any time without garbled characters.

Project code

But you will say that the previous project is already another code, you do not want to modify it, just want to embrace UTF-8 from now on, it is also possible, when you create a new project, to use different encoding and workspace, right-click your project, select Properties, click resource, see text file encoding, click other, select UTF-8, you really need this encoding format, right?

JSP Encoding

Is that all done? No, maybe JSP is the file you deal with the most, you do not also want all JSP files are UTF-8? Then let's take a look. Or click window --> preferences, this time is to expand web and XML --> JSP files, see encoding, hurry to choose UTF-8. If you can, make the settings of your HTML, CSS, and so on all the files into a UTF-8, and you will have a complete UTF-8 solution.

Finally, let's take a look at the effect you set. Create a new JSP file and select any JSP template in step 2. Then look at the generated JSP file, all are UTF-8, now you can rest assured that your files are UTF-8.

Myeclipse 2: struts2 International garbled Problem Solving favorites

Development Tool: myeclipse 6.01, all file encoding is set to UTF-8. After the normal development of all processes ends. Localized messagesource. propertis:

Native2ascii messagesource. propertis messagesource_zh_cn.propertis

Run, and found that the content read from the resource file on the page is still garbled.

Solution: Specify the encoding method during localization as follows:

 
 
  1. native2ascii -encoding UTF-8 messagesource.propertis messagesource_zh_CN.propertis 

Myeclipse 3: cancel the myeclipse quick install dialog box

I used myeclipse6.0 to open the myeclipse quick install dialog box today. What does this dialog box do? How can I cancel it? Who knows? Give me some advice.

First, remove the check box of the myeclipse quick install dialog box.

Remove the check box for Windows> preferences> install/update> Automatic Updates and uncheck automatically find new updates and between y me.

That's all.

Myeclipse 4: enhanced eclipse and myeclipse code auto-prompt functions

By default, the code prompt function of eclipse and myeclipse is much worse than that of Microsoft Visual Studio, mainly eclipse. myeclipse has many options which are disabled by default, you need to manually configure the configuration by the developer. If you are not clear about eclipse, the code prompt function of myeclipse is as powerful as that of Microsoft Visual Studio.

First, let's give a simple example to illustrate the problem. For example, in eclipse and myeclipse code, you cannot get code prompts by playing foreach or switch ), let alone others, and get very friendly code prompts in Microsoft Visual Studio. In fact, in eclipse, the code prompt function in the myeclipse code is usually clicked "." by default, and the code prompt is usually clicked.

Principle: The "Auto activation triggers for Java" option refers to the option that triggers the code prompt. "to". abcdefghijklmnopqrstuvwxyz (, "refers to 26 letters and ., (These symbols trigger the code prompt function. (Rest assured, as mentioned later)

Enhance the code prompt function of eclipse and myeclipse. How can I configure it?

The following describes the procedure (note that myeclipse 6.0.1 is used for my explanation ):

1. Open myeclipse 6.0.1, and then "window" → "Preferences"

2. Select "Java", expand, "Editor", and select "content assist ".

3. Select "content assist" and then see the "auto activation triggers for Java" option under "auto-activation" on the right. In fact, it refers to the "." symbol that triggers the code prompt.

4. The "Auto activation triggers for Java" option should be followed by an ABC letter after "." To facilitate later search and modification. Then, "Apply" and click "OK ".

5. Then, select "file"> "Export", select "perferences" in the pop-up window, and click "Next ".

6. Select the export file path, export it to the desktop, enter "test" as the file name, and click "save ".

7. Find the file "test. EPF" you just saved on the desktop, right-click and choose "open with Notepad ".

8. You can see a lot of information about configuring myeclipse 6.0.1.

9. Press the "Ctrl + F" shortcut key, enter ". ABC", and click "find next ".

10. Find the configuration information of ". ABC.

11. Change ". ABC" to ". abcdefghijklmnopqrstuvwxyz (,". Save and disable "test. EPF ".

12. return to the myeclipse 6.0.1 interface, "file" → "import", select "perferences" in the pop-up window, click "Next", and select the modified "test. open the EPF file and click Finish ". This step is similar to the preceding export step.

13. Finally, of course, the code is tested.

Create a project and a class. Enter switch and foreach in the Code for testing. You will immediately find that there are prompts, and there will be a lot of related prompts no matter which letter you typed, It is smooth and convenient.

Conclusion: The "auto activation triggers for Java" option refers to the option that triggers the code prompt. "to". abcdefghijklmnopqrstuvwxyz (, "refers to 26 letters and ., (These symbols trigger code prompts.

By the way, you can modify the class name and interface name highlighted in different colors. You can configure it in "Java"> "enditor"> "syntac ", expand "Java"> "classes" on the right side, check the "enable" option, and select your preferred color.

Of course there are other related color configurations. Not to mention it. In fact, there are many items that can be configured in the "Preferences" to optimize myeclipse. Specifically, You need to configure them according to your personal preferences.

Myeclipse 5: how to add javadoc (sun source code) in myeclipse)

Press ctrl and click "1:

 
 
  1. The jar file rt.jar has no source attachment.  
  2. You can attach the source by cliking Attack Source below: 

Solution:

Because rtsourceis in the src.zip file of the JDK directory, you can find the src.zip file under the JDK directory.

General myeclipsedoes not have src.zip.

You need to use the JDK installation package path, for example, your JDK installation path: C:/program files/Java/jdk1.5.0 _ 15

Select C:/program files/Java/jdk1.5.0 _ 15/src.zip.

Myeclipse 6: What do I mean by the code automatically generated when using myeclipse to create a JSP page?

What do I mean by the code automatically generated when I create a JSP page using myeclipse?

 
 
  1. ﹤%  
  2. String path = request.getContextPath();  
  3. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
  4. %﹥ 

What are the above two codes used? What do you mean

What is the difference between pageencoding = "ISO-8859-1" and charset = "GBK?

The above two pieces of code obtain the URL of the JSP file,

Pageencoding refers to the storage encoding of your JSP file, that is, the encoding of your JSP file stored on the hard disk,

Charset = "GBK" is the encoding of your JSP Input and Output. Many servers use charset instead of pageencoding when pageencoding is not found.

Some of myeclipse's experiences are introduced here. I hope it will help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.