How to Open .Jsp

By Deborah Lee Soltesz

Updated September 28, 2017

Open JSP files with a basic text editing program.
i ordinateur image by razorconcept from Fotolia.com

The .JSP file extension indicates the file is a "JavaServer Page" (JSP). JSP files are text documents containing source code for dynamically generating content in conjunction with a specialized server called a "servlet container." The source code is a combination of a template and JSP elements. The template consists of Hypertext Markup Language (HTML), Extensible Markup Language (XML), Scalable Vector Graphics (SVG), or any other markup that can be expressed in plain text. The JSP elements are tags starting with "<%" and ending with "%>," and contain directives, expressions or Java programming language code.

Windows

Open the Windows "Start" Menu. Select "Notepad" in the "Accessories" folder in "All Programs."

Open the "File" menu and select "Open..." A standard file chooser window opens.

Select "All Files" from the "Files of type" menu at the bottom of the window.

Choose the folder, drive, device, or location of the JSP file under the "Look in" menu. Navigate to the subfolder containing the JSP file by double-clicking the folders displayed in the main panel until you have located the file.

Click on the file to select it. Click "Open" to open the file in Notepad.

Linux and Unix

Open a terminal window from your desktop applications menu.

Set your current working directory to the directory containing the JSP file. For example, if the file is in the "/srv/www/webapps" directory, type the command "cd /srv/www/webapps" and hit the "Enter" key.

Open the file in vi by typing "vi " followed by the file name and hitting the "Enter" key. For example, if your file is named "hello.jsp" run the command "vi hello.jsp".

Mac OS X

Open a "Finder" window and select "Applications" under "Places" on the left-hand panel. Launch TextEdit by double-clicking "TextEdit" in the main panel.

Open the "File" menu and select "Open..." A standard file chooser window opens.

Click the device, place, folder, or location of the JSP file on the left side of the window. Navigate to the subfolder containing the JSP file by clicking the folders displayed in the right-hand panels until you have located the file.

Click on the file to select it. Click "Open" to open the file in TextEdit.

Tips

Code editors and integrated development environments (IDE) typically provide special features, such as syntax highlighting and automatic completion. If you plan extensive edits to your JSP, a code editor or IDE, such as Dreamweaver or Eclipse, may make your task easier.

Warnings

Word processing software (like Microsoft Word, WordPerfect, and Open Office Writer) is designed to create formatted documents. Using word processing software to edit your JSP files may inadvertently damage your JSP page by adding formatting and other elements that are not valid JSP source code. Only use a text editor or source code editor to view and edit your JSP files.

×