You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Pham Anh Tuan <an...@ichi-corp.jp> on 2006/07/31 11:04:09 UTC
[HELP] Import tool didn't work correctly when reading a jsp file with read method!
Hi all,
I got a problem when using read method to "read" a jsp file: a.jsp.
below is my jsp file's content:
<%@ page language="java" import="com.fredck.FCKeditor.*" %>
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
window.status = editorInstance.Description ;
}
</script>
<form action="sampleposteddata.jsp" method="get" target="_blank">
<%
FCKeditor oFCKeditor ;
oFCKeditor = new FCKeditor( request, "EditorDefault" ) ;
oFCKeditor.setBasePath( "/FCKeditor/" ) ;
oFCKeditor.setValue( "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>." );
out.println( oFCKeditor.create() ) ;
%>
<br>
<input type="submit" value="Submit">
</form>
in my b.vm file:
<html>
<body>
$import.read("a.jsp")
</body>
</html>
when I run my web app normally - run with b.vm file. it runs okie, the textarea editor showed but .. the content was not right:
"This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>"
but when I run a.jsp directly: the textarea editor showed with the right content with html support:
This is some sample text. You are using FCKeditor.
is this a error of Import tool or ... :(
help me!
thanks in advance
bowlkhin
Re: [HELP] Import tool didn't work correctly when reading a jsp file with read method!
Posted by Nathan Bubna <nb...@gmail.com>.
Not sure exactly what the result was here. It sounds like:
- there was no error message
- the import tool *did* pull down content from a.jsp
but i'm not clear on what went wrong. is the content being retrieved
by the import tool incomplete? is it garbled? or is your javascript
just not working?
can you show us the whole generated _source_ from requesting a.jsp
alone compared to requesting b.vm? i can't tell what the problem is
by just seeing what was displayed in the resulting textarea.
On 7/31/06, Pham Anh Tuan <an...@ichi-corp.jp> wrote:
> Hi all,
>
> I got a problem when using read method to "read" a jsp file: a.jsp.
>
> below is my jsp file's content:
>
> <%@ page language="java" import="com.fredck.FCKeditor.*" %>
> <script type="text/javascript">
> function FCKeditor_OnComplete( editorInstance )
> {
> window.status = editorInstance.Description ;
> }
> </script>
>
> <form action="sampleposteddata.jsp" method="get" target="_blank">
> <%
> FCKeditor oFCKeditor ;
> oFCKeditor = new FCKeditor( request, "EditorDefault" ) ;
> oFCKeditor.setBasePath( "/FCKeditor/" ) ;
> oFCKeditor.setValue( "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>." );
> out.println( oFCKeditor.create() ) ;
> %>
> <br>
> <input type="submit" value="Submit">
> </form>
>
>
>
> in my b.vm file:
>
> <html>
> <body>
> $import.read("a.jsp")
> </body>
> </html>
>
>
> when I run my web app normally - run with b.vm file. it runs okie, the textarea editor showed but .. the content was not right:
> "This is some <strong>sample text</strong>. You are using <a href=\"http://www.fredck.com/fckeditor/\">FCKeditor</a>"
>
> but when I run a.jsp directly: the textarea editor showed with the right content with html support:
> This is some sample text. You are using FCKeditor.
>
> is this a error of Import tool or ... :(
>
> help me!
>
> thanks in advance
>
> bowlkhin
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org