jsp

Hai,I have one doubt... In jsp during translation phase our jsp is converted into servlet...Is it possible to see that sevlet code in tomcat server or any other server...Thanks,Muthuselvi.M
[224 byte] By [muthuselvia] at [2007-11-27 3:47:51]
# 1
Depends on what you define as "code". The bytecode gets written into a file named JSP_1.class, IIRC. Or something similar. You'll find it if you look or it. There will be no source code, of course.
CeciNEstPasUnProgrammeura at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 2

Yes, you can.

Under Tomcat, you'll find the the .java file for http://localhost:8080/MyWebApp/MyFolder/MyJSP.jsp as $CATALINA_HOME/work/Catalina/localhost/MyWebApp/org/apache/jsp/MyFolder/MyJSP_jsp.java.

This is, of course, assuming you haven't changed anything under server.xml or other configuration files. If you have, search around under $CATALINA_HOME/work, you'll find your classes somewhere

nogoodatcodinga at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 3
hai,Thanks... Actually this was asked in interview..rgds,Muthuselvi.M
muthuselvia at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 4
hi, yah u can see translation code in tomcat.in tomcat/server/webapps...regards,sekhar
sekharraoa at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 5
hai,thanks...but still i hve doubt ...we can see the class files... am asking the java code..ie conerted servlet as a java file not as a class file..Rgds,selvi
muthuselvia at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 6
hai,Thanks for ur reply...where can we see in webapps...rgds,selvi
muthuselvia at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 7

> till i hve doubt ...we can see the class files... am

> asking the java code..ie conerted servlet as a java

> file not as a class file..

See reply # 2.

The generated servlets code look like*_jsp.java.

Just search for files matching that pattern in your Tomcat folders.

karma-9a at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...
# 8
hai,Thanks...Just now i saw the converted servlet code...rgds,selvi
muthuselvia at 2007-7-12 8:51:39 > top of Java-index,Java Essentials,Java Programming...