Suppose $\Omega$ is a bounded domain in $\mathbb{R}^n$. Consider the Dirichlet boundary value problem for poisson equation $$ \left\{\!\! \begin{aligned} &-\Delta u(x)=f(x),x\in\Omega\\ &u|_{\partial\Omega}=0 \end{aligned} \right. $$ given $f\in C(\bar\Omega)$. A classical solution is $u\in C^2(\Omega)\cap C(\bar \Omega)$ satisfying the above equation pointwise. A weak solution is $u\in H_0^1(\Omega)$ such that $$\int_\Omega \nabla u\cdot\nabla v=\int_\Omega fv\quad \text{for all } v\in H_0^1(\Omega).$$ To show a classical solution is also a weak solution, one has to show if $u\in C^2(\Omega)\cap C(\bar \Omega)$ is a classical solution, then $u\in H_0^1(\Omega)$ and $u$ satisfies the identity in the definition of a weak solution. I can show the identity, and I can show if $u\in H^1(\Omega)$ then $u\in H_0^1(\Omega)$ by trace theorem. The question is how to prove $u\in H^1(\Omega)$?
Edit: The original question was how to show $C^2(\Omega)\cap C(\bar \Omega)\subset H^1(\Omega)$, which may not be true. The above question is the one I really want to ask.
Let $u$ be a classical solution to the Dirichlet problem. To prove that $u \in H^{1}_{0}(\Omega)$, we proceed as follows:
Obviously $u \in L^2(\Omega)$ since $u$ is continuous on the compact set $\bar \Omega$ and hence bounded. The weak derivative is simply the ordinary derivative, what remains to show is that it is in $L^2(\Omega)$.
This follows from the fact that $\Delta u = f$ is also in $C(\bar \Omega)$ by definition of your classical solution and is hence bounded. And if both $u$ and $\Delta u$ are bounded, then so is $\nabla u$.
Now we use that $Tu = 0$ for continuous functions that vanish on the boundary, by definition of the trace operator $T$. A subtle but important theorem asserts that, for any $u \in H^1(\Omega)$, we have $Tu=0$ if and only if $u \in H^{1}_0(\Omega)$.
Finally, integration by parts shows that $\Delta u = f$ weakly.