Servlet source code

i want to attche the servlet source code to my IDE. For starters, I just need to know where to find the source. But I'm also concerned about which source to get.
The following is from my jar file's manifest
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.4.2_06-b03 (Sun Microsystems Inc.)
Name: javax/servlet/
Specification-Title: Java API for Servlets
Specification-Version: 2.4
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet
Implementation-Version: 2.4.public_draft
Implementation-Vendor: Apache Software Foundation
So, does this mean that i have the RI version of servlets, and if i can find the RI source for 2.4, I'll have the correct source for my project?

Depends on the application server used. If it is open source then you can just download the sources at their homepage.
As far as I can see in the manifest, this Servlet API is implemented by Apache. So I guess it's Tomcat. And it is fortunately open source. You can get the sources just straight from their homepage.

Similar Messages

  • Apache TomCat 6.0 - Generate Servlet Source Code

    sup java experts,
    does anyone know how I can view the Servlet source code that's generated by the JSP engine?

    lol...thanks. I know it sounds like a dumb question after having read your answer but I thought TomCat (by default) doesn't save the auto-generated .java files and that i'd have to turn on that feature somehow.
    Anyway, just to wrap up this question for future viewers, it turns out TomCat 6.0 does save the servlet source code generated by the JSP engine. I found mine in
    C:\web\Tomcat 6.0\work\Catalina\localhost\_\org\apache\jsp\marc\test_jsp.java
    Tomcat 6.0 = my installation folder
    marc = a folder I created under the "ROOT" directory (the folder where you put your .jsp files so that the server can find them)
    Thanks again njb7ty!

  • Keeping Generate JSP Servlet Source

              I want to keep the servlet source code generated by WL when compiling JSPs. In
              our development environment we generate servlets on demand (we don't precompile
              in ANT -- there are too many JSPs for that).
              Elsewhere in this newsgroup I found a message that suggested adding this to the
              web.xml file:
              <context-param>
                   <param-name>weblogic.jsp.keepgenerated</param-name>
                   <param-value>true</param-value>
              </context-param>
              However, this seems to only keep the .class file, not the .java file. Unless I
              am looking in the wrong place, WL isn't keeping the generated servlet source.
              Does anyone know if/how this can be done?
              Thanks.
              

              "Aidan Monroe" <[email protected]> wrote in message
              news:[email protected]...
              >
              > I want to keep the servlet source code generated by WL when compiling
              JSPs. In
              > our development environment we generate servlets on demand (we don't
              precompile
              > in ANT -- there are too many JSPs for that).
              >
              > Elsewhere in this newsgroup I found a message that suggested adding this
              to the
              > web.xml file:
              >
              > <context-param>
              > <param-name>weblogic.jsp.keepgenerated</param-name>
              > <param-value>true</param-value>
              > </context-param>
              >
              > However, this seems to only keep the .class file, not the .java file.
              Unless I
              > am looking in the wrong place, WL isn't keeping the generated servlet
              source.
              > Does anyone know if/how this can be done?
              WebLogic creates temporary directory something like:
              D:\WebApp\WEB-INF\_tmp_war_WLS6server_WLS6server_WebApp\jsp_servlet
              where it stores .java files (JSP files transformed into servlets before
              compiling).
              <jsp-descriptor>
                        <jsp-param>
                             <param-name>compileCommand</param-name>
                             <param-value>javac</param-value>
                        </jsp-param>
                        <jsp-param>
                             <param-name>precompile</param-name>
                             <param-value>false</param-value>
                        </jsp-param>
                        <jsp-param>
                             <param-name>workingDir</param-name>
                             <param-value>C:\TEMP\</param-value>
                        </jsp-param>
                        <jsp-param>
                             <param-name>keepgenerated</param-name>
                             <param-value>true</param-value>
                        </jsp-param>
                        <jsp-param>
                             <param-name>pageCheckSeconds</param-name>
                             <param-value>5</param-value>
                        </jsp-param>
                   </jsp-descriptor>
              workingDir parameter defines where WebLogic will store your files
              

  • Where to put the source code files of servlets

              Hello All,
              Normally, jsp pages are put under the WEB-INF directory. This makes them secure.
              But my application is built on servlets. Should I be putting all my source code
              under the web-inf directory.
              If I don't will there be some problem?
              regards,
              Abhi
              

    Hi Abhishek,
              You don't need to put servlet's source code to the war.
              All you need to put there is compiled code. Files containing
              compiled code end with .class.
              Regards,
              Slava Imeshev
              "Abhishek" <[email protected]> wrote in message
              news:3d5373e2$[email protected]..
              > Normally, jsp pages are put under the WEB-INF directory. This makes them
              secure.
              > But my application is built on servlets. Should I be putting all my source
              code
              > under the web-inf directory.
              >
              > If I don't will there be some problem?
              >
              > regards,
              > Abhi
              

  • How to download servlet package source code

    In servlet interface package.there is some implement class,Iwant to see the source code.
    Thanks for answer!

    You are not suppose to see the source code without prior permission from the vendor.
    If your question is about decompiling the java class, you can use jad (or ant other java decompilers). You can give a search in Google for java decompilers.
    By the way, why do you want to see the implementation class?
    Sudha

  • How to protect JSP source code on the Server Side ?

    I am new on JSP. I Already know about various Web and Desktop technologies but is the first time on JSP. I know ASP for example.
    Well, about .NET platform, it protects my source code on the server, the source code is compiled and on the server, only the compiled file are installed, my source code stay with me...
    About JSP, how it works about ? Is possible to hide my source code too ? What the technique to hide the codes ? I need to prevent access to my source codes...
    Roberto

    roberto.novakosky wrote:
    About .exe files, do you know if a java class is more easy or dificult to do reverse engineering ?Depends on who your enemy is. If it's for example a hacker with a lot of C knowledge but zero of Java knowledge, reverse engineering .exe would be easier than .class. If one was interested, one would always take time to learn how to decompile the one or other. Making files secure is a waste of time. It's always "hackable".
    If there was a proof of concept, no one major software vendor would have had so much problems with piracy and cracks/keygens. Think about it once again. It's simply impossible. Just have a clear EULA and actually make work of it whenever you discovers if someone breaks your EULA.
    I was thinking about, the .JSP can be converted to servlet .java, and converted to .class, this way hide the source code.Once again, one could still decompile it (or reverse engineer, so you call).

  • How to reveal JSP source code

    I was just wondering if the source code of a JSP page can be viewed any way?
    The JSP gets translated to a servlet, which pretty much generates HTML and only that is visible to the client browser but is there a way around it?
    E.g. would be secure/suicidal to include usernames and passwords to the JSP source code?
    I would greatly appreciate any feedback.

    The HTML delivered will contain only the output from JSP execution -- you're safe there.
    Every JSP when it is compiled produces a .java file that contains that actual servlet code. There is a risk of a user finding that and downloading it. To avoid this, you want to do one or more of the following:
    1. Turn off the server's retaining of this .java file (it's basically a debugging tool).
    2. Ensure that the .java files are created in a directory that is not accessible via the browser (i.e. outside of docroot).
    3. Apply file system permissions to the directory the files are created in such that they cannot be accessed from the web.
    #1 and #2 should be pretty easily configurable in your application server's settings. #3 is trickier, as you have to set the permissions such that the server can access them, but a web user can't.

  • Debugging source code in Web-Inf

    Dear All Java Expert,
    I'm using Forte 3.0 and debugging source code for different web application folder. example ..\webapps\APPS1 and ..\webapps\APP2.
    Ok, my problem is i was unable to 'share and debug' same servlet file over 2 web application.
    Example, a.java located at ..\webapps\APPS1\Web-INF\Classes\a.java and shared by APP2. The problem is when APP2 having problem i need to copy the java file frm APPS1 to APPS2 web-inf folder for debugging.
    I'm still new using the IDE debugging features, any eXperience people pls don't be hesitate to reply.

    What exactly is the problem?
    You want APPS1 and APPS2 to share the same Servlet code?
    If so, you need to think through what you are doing. Consider this scenario; I point my web browser to www.wikey.com/APPS1 and the servlet in \webapps\APPS1 returns a response. I point my web browser to www.wikey.com/APPS2 and APPS2 returns a response.
    That's what we pretty much expect to happen.
    Now let's say you put the code in a file called BOTH. If I point my web browser to www.wikey.com/BOTH, then it launches the servlet named BOTH. That's reasonable. However, if BOTH consists of code from APPS1 and APPS2 in the same class, then the web server has absolutely no idea which block of code to call.
    However, you can make it www.wikey.com/BOTH?doRoutine=APPS1 where it will launch the APPS1 specific code. But why bother? Why not just launch APPS1 directly?
    So to answer your question, there's no real advantage to having two different URLs point to the same Servlet. Consequently, there's no real advantage to having a debug URL point to to a production URL's Servlet, i.e., no point in sharing code for debugging purposes.
    So the question you want to ask is, "Is there a macro in Forte 3.0 that will allow people to make copies of all the source files in one folder, place those copies in another folder AND set up the URL and environments correctly?"
    The answer is - not that I'm aware of. If you want such a capability, you should code it yourself. But even in Microsoft Windows, it only takes a few seconds to select the folder and do a cut-and-paste copy, then rename the files.
    Incidently, this is totally different than putting common class files in a common directory, modifying the class path, and allowing two separate servlets to import those classes.

  • Source code doesn't seem to line up with the compiled classes in ECLIPSE

    I am trying to write a Tomcat servlet to parse an incoming message, however when I parse the message to get the parts out of it I get a a parse error that doesn't really tell me a lot.
    I have downloaded the source code for the Java Mail API 1.3.2 and attached it to the jar file in Eclipse.
    However when I debug the code and step through it I get two problems. 1) I get a warning that I can't see the local variables (not really a great problem). 2) The lines in the source code do not line up with where the stack says I am.
    I have checked the dates on the various classes and the source of the API and they seem to line up.
    I did try to recompile the classes just as an experiment but I am runing JDK_1.4.2_06 and the source seems to be set up for 1.5 and I have some missing classes. I can't switch to 1.5 because there are some other servlets running on this server that won't work on 1.5.
    Can anyone give me a clue how I can at least get the the correct line number.
    Thanks
    Brynn

    Has anyone any ideas on this please?

  • Help needed to use Source code control system

    Hi all
    I am working on Suse 9.2 and I use JSP and Servlet in my project.I like to use Source Code Control System (SCCS) . But I have no idea about that.I need some help to initiate my project.
    Thanks in advance.
    -jegan

    I don't know this "SCCS" but I advice you to use Subversion as it is widely used open source standard.

  • How can we prevent viewing the source code  of JSP by the user

    Dear sirs,
    how can we prevent viewing the source code by the user ( from the browser for the Viwe Sorce option) for a JSP file that use struts frame work.
    infact i don't wan the user to view the javascript that in incorporated in the JSP for various purpose...
    thanks and regards...
    Sudheesh K S
    INDIA

    Dear sirs,
    how can we prevent viewing the source code by the
    user ( from the browser for the Viwe Sorce option)
    for a JSP file that use struts frame work.
    infact i don't wan the user to view the javascript
    that in incorporated in the JSP for various
    purpose...
    thanks and regards...
    Sudheesh K S
    INDIAJSP and Servlets are programs/scripts that run on the server. The user/clients only sees the HTML output generated by the server. If you want to hide JavaScript from casual users then you can put the JavaScript code in a seperate file. This file can however be read from the Cache.

  • Where to download TextClient & ChatServer application source code ?

    Hi All,
    This link:
    http://www.oracle.com/technology/pub/articles/dev2arch/2006/02/sip-servlet.html
    talks about TextClient & ChatServer application explaining the SIP Servlets.. In the downloads section the links are disabled.
    Earlier the source code for the same was available at http://dev2dev.bea.com/2005/09/textclient.zip.
    But now this link redirects to Oracle Weblogic home page.
    Please suggest me the new link where I can find the above mentioned application's source code.
    Thanks,
    Kriti

    karnes wrote:
    Looking for two zip files: j2sdk-1_4_2-src-scsl.zip & j2sdk-1_4_2-bin-scsl.zip. You say that: "You can get the src.zip which comes with the JDK", what JDK, give me the exact fully qualified JDK name.Those are for building the entire j2sdk distribution.
    In every j2sdk there is an src.zip with the Java source for all the core Java classes.

  • Modify source code for Active-X viewer

    Requirement:
    Whenever an ActiveX viewer is selected, and a report link is clicked, the control goes to Url - CeVwr which is a servlet pointing to ReportSourceBridge.java residing in reportsourcebridge.jar. This class alongwith all other classes present in this jar pop up the parameter screen and process it to display report. Our requirement is to dynamically prepare this parameter screen, by localizing the strings - parameter prompts and their options - based on user's locale.
    Reason for workaround:
    BO does not provide any source code for Active-X viewer but they do for DHTML and Advanced DHTML viewer. So it was easy for us to implement our requirements in DHTML and AdvDHTML viewers but for Active-X viewer it is not the same story.
    Workaround:
    We identified a core class ParameterHTMLRenderResult.java present in rascore.jar, which is the one which genrates HTML for parameter prompt screen for all viewers, accept for the Java one. We extracted all parameters, their descriptions, their prompting options as well as current values and modified the html result to get a localised HTML result. We also passed user's locale in this class.
    Question: Is the source code for Active-X viewer available? Is it okay for us to modify Active-X viewer?

    Hi Chris,
    We do not provide the activex viewer code and do not support modifying it or any of our other code.
    Code for those two other viewers is available since they are html based viewers so that code is easily obtainable, but we do not support customers making changes to it.
    Jason

  • I am running 10.6.8 and using iweb for my web site. After several SEO analysis they all indicate I need H1-6 header tags. After looking at the source code I see there are none in iweb. Is it necessary to add? If so, how do I add H Tags to iweb.

    I am running 10.6.8 and using iweb for my web site. After several SEO analysis they all indicate I need H1-6 header tags. After looking at the source code I see there are none in iweb. Are they necessary to add?  Why would one add these tags and how do I add H Tags to iweb? And are there examples to look at? I am slowly learning about simple web design and assumed that iweb was stand alone without having to write code. Is this one of the reasons iweb is no longer supported? Thanks for looking at this!

    A simple text page like this:
    Heading
        sub heading
              text paragraph ....
    Is traditionally represented by html tags like:
    <h1>Heading</h1>
         <h2>sub heading</h2>
              <p>text paragraph ... </p>
    I would guess that the use of h1-h6 tags helps search engines to understand the structure of a page as the tags imply a certain structure.
    This can be compared to more generic tags like <div> that could represent any kind of content - and may be what iWeb uses (you'll have to check yourself).
    I would generally recommend that you use some kind of up to date blog/site building tool, perhaps Wordpress or Squarespace (I haven't used either one myself) that support current web technologies - this should reduce your SEO issues and make it easier to properly support mobile/tablet users.

  • Source code not generated in mapping

    Hi,
      I tried mapping an Idoc to an XSD in my mnessage mapping.When I try to check my message mapping I get an error msg : "<Mappingname> has no Source Code"...My scenario is only some fields of Idoc map to the XSD and the rest are constants..I am in XI3.
    Any help is appreciated...
    -Teresa

    Hi Teresa,
    Have you tried deleting the map and re-doing it ? Or is this unfeasible ?
    Cheers
    Colin

Maybe you are looking for