Just outside what used to be known as the Free City of Danzig, a thin sliver of land juts out into the Baltic Sea. It is called Westerplatte and it was here -- 4:45 a.m. on Sept. 1, 1939 -- that the first shots in World War II were fired.

In a symbolic gesture of homage, delegates attending the first national convention of Poland's independent trade union federation Solidarity visited the site yesterday. They laid wreaths on the memorial to 182 Polish soldiers who, for seven days, defended the peninsula against a constant artillery barrage from Nazi Germany's heaviest battleship supported by the Danzig garrison and several thousand troops.

When the Polish commander finally surrendered after all his ammunition had run out, he was allowed by the Germans to keep his sword -- a mark of respect for his bravery. Letter From Poland

Recounting the incident, one of the Solidarity delegates remarked: "That's the Polish character for you. What matters is not that we eventually lost, but that we held out for so long against such overwhelming odds.

And that, at its simplest, also provides the clue to this week's Solidarity congress. Poles are aware of the tragic flaw in their history, which gives them a capacity for heroic deeds, and national uprisings on a grand scale, but a lack of will to see them through to final success. This time, Solidarity activists are determined to complete what they have so spectacularly begun.

FOR THE MOMENT Solidarity feels confident and strong. The modernistic Olivia sports hall on the outskirts of Gdansk is awash with Solidarity flags, Polish national emblems and union publications including a special congress newspaper.

Outside, crowds of townspeople listen to relays of the debate and watch the delegates come and go. A brisk trade in Solidarity paraphernalia flourishes. One enthusiast has set up a stall with hundreds of badges from different Solidarity regions that he exchanges with other collectors.

After the debates, special entertainment is provided. One evening a festival of "forbidden" songs was held. For four hours, a 3,000-strong audience reveled in Poland's new-found freedom of expression -- indulging in a mix of laughter and emotion directed against the Soviet Union, the Communist Party and themselves.

Dominating the stage was a hangman's noose alongside tattered portraits of discredited former leaders and a hungry, exhausted worker -- a parody of the upbeat propaganda techniques employed by communist countries.

One ballad celebrated the lost ideals of a Polish communist. On Judgment Day, God asks him what he did with his life. His proud reply: "I was building socialism."

The singer goes on to describe what a wonderful world he was creating -- full of plenty, justice and equality. "And what did you achieve?" he is finally asked. He looks downcast. "We were so busy building socialism that we never had time for anything else," he replies.

Another song was dedicated to the "political naivete" of Americans who could not conceive what life under communism was like.

But the climax to the festival was an ultrapatriotic anthem aimed, quite openly, at the Soviet Union. It praised the legendary general, Tadeusz Kosciuszko, who died fighting the Russians during the 18th century partition of Poland.

The entire audience rose to its feet to join in "the song of freedom" which went something like this:

"Oh Kosciuszko, look down at us from heaven when we walk in our enemies' blood . . . . Whoever said the Muscovites were our brothers, I swear to shoot his head off . . . . We will win and chase the traitors out because Kosciuszko is our leader."

The song was written during the 1831 uprising, which was eventually put down by czarist troops following damaging splits among the Polish insurgents. A century and a half later, it is still being sung with equal passion.

That, too, is the stuff of Polish history.

WHAT HAS BEEN remarkable about the first stage of the congress is how much, superficially at least, it resembles the Communist Party congress held last July.

Both meetings began with a display of patriotic fervor as delegates stood to sing the national anthem. Both are witness to the emergence of a new generation of Polish leaders: youthful and self-assured, but also inexperienced.

The inexperience is reflected in the preoccupation with the internal mechanisms of democracy. Suddenly it seems as if everything gets put to the vote. At the present Solidarity congress, as at the party congress before it, votes are being taken to determine the composition of obscure subcommittees, to delete commas and periods, even on whether or not to take a coffee break.

It is as if a kind of mass catharsis were at work after 3 1/2 decades of authoritarian rule.

What worries some Poles is whether all this idealism can be sustained or whether grave economic difficulties will cause them to lapse back into apathy and disillusionment. Already voices are to be heard among rank-and-file Communists claiming that, for all the outward observance of democratic procedures, the party congress was manipulated by a group of professional politicians determined to confront Solidarity.

Many Solidarity officials are convinced that the communist authorities are now waiting for a suitable moment to break the union's power. The government's tactic, they believe, is to provoke the union into fighting useless battles. Then, when the nation has lost its energy for further conflicts, the revolution will finally be suppressed by guile or by force.