Solved

basic jsp error

Posted on 2004-03-26
4
184 Views
Last Modified: 2010-03-31
Hi, the following code throws this error, how do i combine convert these statement to valid jsp?

   outfile.write("<?xml version="1.0" encoding="ISO-8859-1"?>");
   outfile.write("<?xml-stylesheet type="text/xsl" href="localhost:8080\seanproj\cdcatalog.xsl"?>");

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\seanproj\makexml_jsp.java:146: ')' expected
0
Comment
Question by:Ronayne
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 10692881
outfile.write("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>");
   outfile.write("<?xml-stylesheet type=\"text/xsl\" href=\"localhost:8080/seanproj/cdcatalog.xsl\"?>");
0
 

Expert Comment

by:Sony213002
ID: 10693948
hello
if u r getting ther error
" ; expected instead of this token "
or
"  ) Statement inserted to complete Statement"

then u have forgot to put the escape character for u r string
put a \ before every occurrence of " character in u r string
hope this will solve u r problem
0
 

Author Comment

by:Ronayne
ID: 10702702

Cheers, objects code worked fine, thx again
0
 
LVL 92

Expert Comment

by:objects
ID: 10702725
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 40
advertisement module in core php 4 159
xampp tool 12 47
Configure a Bean in an XML file 4 31
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
The viewer will learn how to implement Singleton Design Pattern in Java.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now