Discussion:
"View Servlet" JSP files in web applications.
Jonas Stumph Stevnsvig
2008-10-02 09:43:24 UTC
Permalink
I've got a java web application with plenty of Servlets and JSP pages,
and was just exploring the interface in netbeans when I came across the
"View Servlet" in the context menu of a JSP page.

if I click it it says "The View Servlet action cannot be performed. You
must run the JSP page first."

But how do I "Run" the JSP page? - I don't seem to be able to do so (run
file - shift+F6 is greyed out) - might it be due to me running with
imported sources?

any hints?
Thomas Kellerer
2008-10-02 10:15:42 UTC
Permalink
Post by Jonas Stumph Stevnsvig
I've got a java web application with plenty of Servlets and JSP pages,
and was just exploring the interface in netbeans when I came across the
"View Servlet" in the context menu of a JSP page.
if I click it it says "The View Servlet action cannot be performed. You
must run the JSP page first."
But how do I "Run" the JSP page? - I don't seem to be able to do so (run
file - shift+F6 is greyed out) - might it be due to me running with
imported sources?
any hints?
You need to run your application and then display the page from within the browser. The servlet will not be generated until you actually display the page the first time.

Thomas
Jonas Stumph Stevnsvig
2008-10-02 11:05:17 UTC
Permalink
ah that makes sense - so the myjsppage_jsp.java file that tomcat creates
is the servlet netbeans refers to? - so I must have a configuration
error - I don't seem to be able to find out how to point netbeans to the
catalina work directory.

Jonas
Post by Thomas Kellerer
Post by Jonas Stumph Stevnsvig
I've got a java web application with plenty of Servlets and JSP
pages, and was just exploring the interface in netbeans when I came
across the "View Servlet" in the context menu of a JSP page.
if I click it it says "The View Servlet action cannot be performed.
You must run the JSP page first."
But how do I "Run" the JSP page? - I don't seem to be able to do so
(run file - shift+F6 is greyed out) - might it be due to me running
with imported sources?
any hints?
You need to run your application and then display the page from within
the browser. The servlet will not be generated until you actually
display the page the first time.
Thomas
Loading...