javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Compare each character of 2 words. If you find more than 1 change or you find zero changes then the list is not a word ladder

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

This is a java forum.
For the first, you can have an int array of length the number of letters in the alphabet (24 or 26)
Loop each String of the list and take each character and increase the right element of the array by one.
the first element for example would be how many 'a' are found.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Why did you make 2 posts with one hour difference? Now people will start answering both and it would be a total waste of their time?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

That error tells you exactly what is the problem and where to look:
Exception in thread "main" java.lang.NullPointerException
....
at Clustering.main(Clustering.java:39)

At the Clustering.java file line 39, in the method method, you are using something which is null

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Have an array of Color instances with the potential colors and a global index.
With click of the button use the element at the current index and increase the index by one. So with the next click the next color will be used.
When the index reaches the length of the array set it to zero in order to start from the beginning:

int index = 0;
Color [] array = {......};

......
onButtonClick() {
  use Color at array[index];
  index++;
  if (index==array.length) index=0;
}
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Hi, In student project have use 2 combo boxes (state and district) how to write the in jsp code please anybody tell me my mail

Start a new thread, post some code and read for starters some tutorials.
For html this helped me a lot:
http://www.w3schools.com/default.asp

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

When the Net Beans compile the project they create a jar file and a README.txt file.
Take the jar file and follow the instructions in that file. Try to run the jar file from a command prompt.
Also wouldn't you present the source code as well?

And it most essential when you have the time, to learn how to compile and run java classes from the command prompt.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
<a href="page.jsp?param1=value1&parame2=value2&param3=value3">Link</a>

Notice that only the first parameter has the '?' . The rest are separated by the '&' symbol.

And at the jsp you can do this:

String a = request.getParameter("param1"); // value1
String b = request.getParameter("parame2"); // value2
String c = request.getParameter("param3"); // value3
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

r u a nut chirag.
have u ever used netbeans? i dont think so .

you r totally wrong.

No he is not wrong. He is absolutely right.
You cannot run a java file. When you click the run button at the NetBeans (something that anybody can do), Netbeans creates a jar file with all the classes of the projects and it runs the jar files.
Practically it runs the .class file.

> The original poster asked how to run the program from outside the Net Beans.
What if you make a program and want to run it to another computer? Will you carry the entire Net Beans installation with you.
Or do you think that if someone has a project and they want to run it, they open first the IDE, then load the source code and the click the run button. I am sure that nobody has ever thought something better.

Perhaps this:

c:\yourfolder> javac filename.java
c:\yourfolder> java filename

Now that is something that apparently not anybody can do

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Hi I need code for searching the records in a table for specified conditions using jsp

Start a new thread and post some code

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

It the same problem I explained to another post. When you divide an int with an int, you get an int:

int ettor = (int) a/k*100;

a, k, 100 are ints, so the result would be int:

int/int = int
3/5 = 0 (not 0.6)
10/4 = 2 (not 2.5)

So it is better to do this:

int ettor = (int) (1.0*a/k*100);
// or
int ettor = (int) (100.0*a/k);
// or
double ettor = 100.0*a/k;

1.0*a/k*100
The first calculation would be: 1.0*a, double * int which will result to a double so then you will do double/k which will again be double

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

So after going over this a few times I found that the issue was with the 5/9 and 9/5. For some reason Java was not calculating them correctly so I had to input the decimal equivalents instead.

You were right ti out the decimal equivalents, but java was calculating them correctly:

9 is an int
5 is an int
When you divide 2 ints, another int must be the result.
So the result should be:
int/int = int
9/5 = 1

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

That is not a good example and it is a bad way to do things. Not to mention that the OP said nothing about html code.

Only the database connectivity is almost ok. You forgot to close the ResultSet, Statement and ResultSet.
First: How do you know that the table entered at the field will always have 2 columns.
Second: Never put html code in servlets. Read the data from the DB, put those into an array of objects using OOP, and then send the array of objects back to a jsp through the request in order to be displayed at the jsp page.

Of course the above would have been helpful if the OP has said that the whole application would be web application.

ali.nazia999 commented: good +0
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

U have to do it by your self my dear
and submit to me in ur class on Saterday

Regard
Ms.Kavita

If this post is for real then 2 thumbs up. LOL!

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

How is the code for ajax look like?

Check the tutorials of AJAX at the w3schools site:
http://www.w3schools.com/default.asp

Or use jquery:
http://docs.jquery.com/Main_Page
and
http://malsup.com/jquery/form/

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Look at the API of java.util.Vector, check some tutorials about sending data through request and come back with some code

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

What you are trying to do is very simple and explained in all basic GUI tutorials. Try to search some at the site of SUN

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Telling you the solution will not solve anything. Net Beans tell you where the error is and what is the problem. If you can't fix it then I would suggest to stop what you are doing and start by reading very, very basic tutorials and try to learn simple basic core java and programming.

I believe that what you are trying to do is too advanced for the skills you have, so it is better to study a bit more.

Also if you want authentication, You need to compare the username given with the one that the query returns. You only have one username in your if expression and you are trying to find it out if it is false or not. I don't think that username can be neither true nor false, because I assume that username is a String. Comparing the username given with the one that the query returns will result true or false.
The same applies for password

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
while (summan >= k){

You set summan to be zero and I assume that k is something positive. Then how is it possible for 0(summan) to be greater then k ?

Also this is redundant: summan = summan ++; Try this: summan += 1; Or this: summan++;

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

First of all thanks a lot for the reply.

I red somewhere that the more correct way is that the jsp document will cal a servlet that will execute the code and reply back to the jsp .

Do you accidentally have any example of how i do that ?

Thanks a lot again
Michael

Check the tutorials on top of the jsp forum. Try the one about MVC and database connectivity. It has an example on how to redirect, using request dispatcher:

request.setAttribute(yourObject, "key");
RequestDispatcher dispatcher = request.getRequestDispatcher("page.jsp");
dispatcher.forward( request, response);

And at the page.jsp:

YourObject yo = (YourObject)request.getAttribute("key");
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Well, you cannot mix java with JSP. Meaning that you cannot just execute a java function when a button is clicked, because java is executed at the server and when you are at the page, you are at the client.

What you can do is, when you click a button to submit to a servlet, then execute the java method and then redirect back to the JSP.

An easier way for you to understand, but not entirely the best way would be to submit to another jsp page:

Page 1:

<form action="page2.jsp">
  Input: <input type="text" name="someInput" />
  <input type="submit" name="submit" value="Submit Buton" />
<form>

Page 2:

// This will be executed at the server:
// JAVA CODE
<%
String input = request.getParameter("someInput");
JavaClass jc = new JavaClass();
String result = jc.someMethod(input);
%>

// And this would be rendered at the client:
// HTML CODE:
Result: <%=result%>
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

If you make method static then everything needs to be static and you don't want that as you said.
So create an instance of B and call it like I told you:

B b = new B();
b.method();

Now, are you saying that you want to create an 'A' instance and somehow call the "method"?
Or are you just trying to access username:

A a = new A();
System.out.println(a.getUsername());

B b = new B();
b.method();

Or:

public class A {
      private String username = "Unknown";
       
      public A() {
      username = "Virux";
      }

      public String getUsername() {
        return username;
      }


      public void method() {
          System.out.println(username);
      }
}


      public class B extends A {
        public B() {
           super();
        }
      }

And call the method like this:

A a = new A();
a.method();

B b = new B();
b.method();

A [] arrayA = new A[2];
arrayA[0] = new A();
arrayA[1] = new B();
for (int i=0;i<arrayA.length;i++) {
    arrayA[0].method();   
    arrayA[1].method(); // this is the B instance. If you override the method in the B class then it would be not the A method called but B.
}

// And if you put additional stuff in the B class, in order to access them then:
if (arrayA[1] instanceof B) {
  B b = (B)arrayA[1];
  b.someOtherMethod(); // defined only in B
}

Try doing this, and then run the example above:

public class A {
      private String username = "Unknown";
       
      public A() {
      username = "Virux";
      }

      public String …
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Class B has the username variable because it inherits A.
But If you want to access it then you need to choose how to access it: private, public protected.

I think that since you didn't add anything it is private so naturally you cannot access from outside that class.

You can make it public, but then anyone would be able to access it.
You could make it protected, or better private and also add public method that returns the username.

public class A {
	private String username = "Unknown";

	public A() {
		username = "Virux";
	}

        public String getUsername() {
            return username;
        }
}

public class B extends A {
       public B() {
         super();
       }

	public void method() {
		System.out.println(super.getUsername());
	}
}

Also the code you posted will not compile, so I removed the line that would give you the error. The B.method() cannot execute because the method() is not static.


EDIT:
After reading the rest of your post, if you create an A instance the you cannot call the "method" because it is part of the B class.
If you create a B class and call "method" then it will print whatever the "username" variable returns.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

In one code you do this:

System.out.println(moviesList.get(1).printMovies());

Which is correct.
And at the other, you do this:

inputLine = n_moviesList.get[i].printMovies();

which is wrong.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Is this java? It looks like it is some sort of C.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You do this to compare the users:

while(rs.next()){
  String user=rs.getString(1).trim();
}

if (!newUser.equals(user)) {

}

You put the username in the "user" variables that is defined and initialized in the while loop, but the one you are using for comparing the names is a different user variable. The "user" in which you put the username from the DB is declared inside the while and cannot be seen from outside. It is out of scope.
The ONLY reason the code compiles is because you have probably declared another global "user" variable. That is the one you are using for comparing but you don't give it value.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

anyone?

Where you the one who wrote the Farm class?
I need to know this because, I need to understand what was given to you initially.

Also you could do this:

myFarm.add(new NamedCow("Elsie"));
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You hardly use session. Maybe you should put it in request and use request dispathcer to send the request to another jsp or servlet.
Use the request.setAttribute(String, Object) and the request.getAttribute(String)

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
Value of Flag: <%=flag%>
<input type="image"  tabindex="22" id="addBtn" src="../images/add_big.gif" alt="<%=st.getSiteTerm("add")%>" onclick="<%if(flag==1){%>hi();<%}else{%>setAction('1');<%}%>">

Try this to make sure, and then right click the page and select view source code. And try to see the html that is rendered. try to see which method is written.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

Make transactions: Many products are sold to customers by salesman in one
visit. Transactions for each product with its quantity is recorded in
transaction_product.dat file and the receipt no is recorded in transaction.dat
file. It is important to note who sold the products. Salespersons bring the
manual receipt to data entry officers and they enter the data into the system.

I assume that you have objects for the above parts (I,II,III)
Let's say that you have an Object like this:

class Transaction {
  private Procuct prod = null; // the product sold
  private int quantity = 0; // the number of items sold
  private Customer cust = null; // to whom it was sold
  private Salesman salesMan = null; // the salesman the made the sale
}

How do you want to save the object. One easy way for that would be to use the Serialzable interface. Have you been told a specific way to make the save?

Also I don't understand what needs to be saved to each file. Personally, I would have one file with objects like the one above.

Maybe in the transaction_product.dat you must save the above and at the
transaction.dat file the total price of all the transactions.

For example, if One Salesman, sold 2 prodA products and 3 prodB products to one customer, then maybe you must save the total value as well some id of that sale.

class Transaction {
  private int …
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I tried that code and it works ok. Are you sure about the value of the flag?

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

help help....i cant use my codes....dono how to wirte do while....

Start a new thread and post some code

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

The alert will not fire because it is in the else block. The if is true:

<%
// the if is always true. It will not go to the else and the alert which is inside the else will not execute
if (true) {

} else {
   %>
   <script>alert("error");</script>
   <%
}
%>

The if is always true, so the script that is inside the else will never be rendered to the page and will not execute.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

2 for loops. Use the System.out.print() method to print at the same line and System.out.println() to change lines. The index will tell you which number to print and how many times(inner loop)

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

When the button is clicked you can hide, or better dispose(I think that that is the name of the method of the JFrame class) and create new window.

class JLogin extends JFrame ... {

..

  public void methodUsedWhenLoginButtonClicked(ActionEvent evt) {
      JMainPage mainPage = new JMainPage();
      mainPage.setVisible(true);
      this.dispose(); // use this if you don't want to keep the state of the class. Meaning if you want to close completely the window and forget lose all the values of its attributes.
  }

..

}

For making a back-forward page:

class JFirstPage extends JFrame .... {
   private JSecondPage secondPage = null;   

   public JFirstPage() {
     super();
     ......
   }

   public void buttonClicked(ActiobEvent evt) {
      this.setvisible(false); // hiding this window
      if (secondPage==null) secondPage = new JSecondPage(this); // passing it to the next window
      secondPage.setVisible(true); // showing the next window
   }

}
class JSecondPage extends JFrame .... {
   private JFirstPage firstPage = null;   

   public JSecondPage(JFirstPage firstPage) {
     super();
     this.firstPage= firstPage;
     ......
   }

   public void buttonClicked(ActiobEvent evt) {
      this.setvisible(false); // hiding this window
      firstPage.setVisible(true); // showing the previous window. Keeping ALL the values it had (the values of the text fields or anything else)
   }

}

With the first way you "dispose" the window and you lose the values it had and if you want to open it again, you need to make a new one.

With the second way you pass the same instance to the other window through the constructor and you can hide or show which ever window you want

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I couldn't understand much from your question, but I think that meant this:

employee emp[]=new employee[5];
.....
if (order by id) {
   Arrays.sort(emp,new idComparator());
} else if (order by name) {
   Arrays.sort(emp,new nameComparator());
}
for(int i=0;i<emp.length;i++){
 System.out.println("empID : "+emp[i].getID()+" empName :"+emp[i].getName());
}
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You can use the split method to create an array of the words of the String.
Take that array and sort it.
Then create a new String from that array. So now you have a new String with the words of the previous one sorted. Now you can use the equals method.

String s1 = "b a c";
String [] tok1 = s1.split(" ");
Arrays.sort(tok1);
for - loop the tok1 to create a new String: "a b c"

String s2 = "c b a";
// do the same and the final String would be: "a b c"

// Now you can compare them
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

You don't initialize c by calling its methods. You need first to initialize it then call them. c is null, you only created the array, not its elements:

c = new College()

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

ok..but I'm trying to initialise c using the read(); is there something wrong with that ?

How are you going to call the read() method if the c doesn't exist!
Study how object are initialized. Obj o = new Obj()

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

No, c is an array of objects. c is the object which is null because you haven't initialized it. c is null, c is a College object, c is an array

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
<%
String init= "3";
%>

<select name="dropDown">
  <option value="1" <%= ( "1".equals(init) )?"selected":"" %> >One</option>
  <option value="2" <%= ( "2".equals(init) )?"selected":"" %> >Two</option>
  <option value="3" <%= ( "3".equals(init) )?"selected":"" %> >Three</option>
  <option value="4" <%= ( "4".equals(init) )?"selected":"" %> >Four</option>
  <option value="5" <%= ( "5".equals(init) )?"selected":"" %> >Five</option>
</select>

Although it is better to use a for loop for these things (<select>)

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

pano po gawin sa java yung kunyare nag-enter ako nang number tapos ang lalabas asteris(*)

Start a new thread.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

When the use logs in, put its username in the session:

session.setAttribute("USER", username);

At the beginning of each page you can do this:

String username = (String)session.getAttribute("USER");
if(username==null) { // session expired
// FORWARD WITH ANY WAY YOU WANT

// I don't know about this one. I usually use the forward tag
RequestDispatcher rd = context.getRequestDispatcher("/demo/inner.jsp");
rd.forward(request,response);
}

evstevemd

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster
Staff staff1 = new Staff();
// and call its methods to set the name and the other values. Then call its other methods to display it.

Doesn't this code works?

try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please input a name and press Enter ");
String Name = in.readLine();
System.out.println("Please input an Id and press Enter ");
Integer Id = Integer.parseInt(in.readLine());
System.out.println("You entered " + Name + " id: " + Id);

Staff staff1 = new Staff();
staff1.GetEmployee(Name, Id);
staff1.ShowEmployee();
staff1.ComputePay();
} catch (Exception e) {
  e.printStackTrace();
}

All you have to do is read the other values as well.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

thanks again javaAddict i did solve it myself here is the right code

What was the problem?

I would suggest not to use that kind of code. Didn't this work:

public class UserMgt {

  public static boolean login(String user, String pass) throws Exception  {

Connection conn = null;
Statement st = null;
ResultSet rs = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");    
    conn =DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:orcl", "sourcepad", "s");
     st=conn.createStatement();
     rs=st.executeQuery("select username,password from user_tab where username='"+user+"' and password='"+pass+"'");

        if(rs.next())
         {
         String username=rs.getString(1);
         String password=rs.getString(2);
         return user.equals(username) && pass.equals(password);
          }
          return false;
// the finally will execute despite the return and the connection will be closed and it MUST be closed.
} catch (Exception e) {
    e.printStackTrace(); // you print the error for debugging
    throw e; // you re-throw the exception to "alert" the caller of this method that something wrong has happened
// the finally will execute despite the throw and the connection will be closed and it MUST be closed.
} finally {
            if (conn!=null) conn.close;
            if (rs!=null) rs.close;
            if (st!=null) st.close;
}

}

}
<%@ page contentType="text/html;charset=windows-1256"%>
<%@ page language="java" import="java.sql.*"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256"></meta>
    <title>untitled</title>
  </head>
  <body>

  </body>
  <%  
String user=request.getParameter("userName");
String pass=request.getParameter("password");

     try{
    
    boolean login = UserMgt.login(user, pass);
 
             if(login)
             {
             %>
             <jsp:forward page="/indexenglish.jsp" />
         <%}
         else {
          %>
             <jsp:forward page="/fail.jsp" />
         <% }
}
catch(Exception e1)
{
%>
<jsp:forward page="/errorPage.jsp" />
<%
}
%>
</html>

Better take a look at the tutorial at the top of the jsp forum page with title database connectivity (MVC)

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I would suggest to make these changes:

for (int i = 0; i < schoolofdbTables.length; i++) {
            PreparedStatement ps = null;
            String query = "";
            try {
               query = ModelUtils.getXMLResource(schoolofdbTables[i].trim());
                ps = (PreparedStatement) conn.prepareStatement(query);
                ps.execute();
                bCreatedTables = true;
                ps.close();
               System.out.println("created table: "+schoolofdbTables[i]);
            } catch (SQLException ex) {
                ex.printStackTrace();
System.out.println("Table was not created: "+schoolofdbTables[i]);
System.out.println("Error at:"+schoolofdbTables[i]+":"+query);
            }
        }

With that way you can see which query went wrong. With your code the System.out.println("created table: "+schoolofdbTables[i]); was always executed because it is outside the try-catch.

Also the errors tell you the line of the file that occured. Check it out. And it is good to print the query run. Try the code again and see the queries that went wrong.

java.sql.SQLException: SQL text pointer is null.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.newSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
at model.dao.ConnectDerbyDAO.bCreatedTables(ConnectDerbyDAO.java:193)
at model.dao.ConnectDerbyDAO.createDatabase(ConnectDerbyDAO.java:149)

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

The String class has the charAt method. "Loop" the String using its length and get each character of the String.

Then if you take that character and put it into an int, you have the ASCII:

for-loop {
char ch = yourString.charAt(i);
int ascii = ch;
System.out.println(ascii);
}
javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I removed anything pertaining to user or password from my properties as I believe that it will be needed for the user to access the db.

I think it is connected now.

would any of this output suggest it is connected?

You wrote the code and you want it to do something. Why don't you check the database and see if the query did what you want. Create the table for example.

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

I don't know if I understood correctly or you already know it. You are supposed to enter the username, password of your own database. Are you saying that the sa, manager are just examples from some code snippet?!

javaAddict 900 Nearly a Senior Poster Team Colleague Featured Poster

The first argument is with '?'

<a href="JSP2.jsp?id=1&name=2&aaaa=b">Link</a>

And the others with '&'