cancel
Showing results for 
Search instead for 
Did you mean: 

how to save html code into a html file in webdynpro

Former Member
0 Kudos

Hello Everyone!

I want create a html page in WebDynpro,

example :

String mystr = "<html><head><titile>This is a text</title></head><body> this is body</body></html>";

I want create a html page and save this to the *.html page , how can i to do ?

thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI

you can create html files in java perspective.

goto java perspective.

File>new>file.

enter filename with .html extension.(xxx.html).

When you are trying to create html file it will ask for Parent folder,select your corresponding webmodule project in which you want embed html file.

Regards

sowmya.

Former Member
0 Kudos

HI! sowmya&Satya

1st:

I use method (File>new>file.) create a html under my project . but when I swith web dynpro perspective, can't found the html file under my current project ?

2nd:

public void onActionInputToHtml(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionInputToHtml(ServerEvent)

String mystr = "<html>.............</html>"

//@@end

}

how to input "mystr" to the html page which I have create in 1st step ?

3rd :

how to display the html page In IE when run my project program ?

Thanks!

Former Member
0 Kudos

HI,

u cant find the html u have created in java perspective

in the web dynpro perspective..

u can navigate from a web dynpro application to a

java application

give like this

String url = "/WebClient/WebClient.jsp";

where WebClient is your project name in j2ee perspective

WebClient.jsp is ur jsp name

u can give .html if it is a html page in java perspective.

Refer this link for more details

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a08c287b-96a5-2a10-a691-b8b8bc40...

Regards,

Satya.

Former Member
0 Kudos

hi

definately you cant find html file in webdynpro perspective.

Do one thing,it may work.

create project in webdynpro perspective and using crete model tab you import the webservice model you have already created.

1) create webmodule project

2)create html file in that

3)goto webdynpro perspective ,create model(webservice model) in your project and implement your required functionality.

hope this will solve your problem.

Former Member
0 Kudos

HI! Sowmya&Satya

Thank you ! let me try and test.

Former Member
0 Kudos

HI!

I hava do a test according to this link,

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a08c287b-96a5-2a10-a691-b8b8bc40...

but this datum not said how to transfer the input data to the jsp page, can you know how to do ? how to transfer Parameter ?

Thanks!

Answers (2)

Answers (2)

Former Member
0 Kudos
p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

We add HTML and JSP code into Web Module projects. To add the .html file into a web module project and then use it via "Properties->Project Refrences".

Is there a particular reason that you need to put it into the Web Dynpro DC?

Thanks.

p256960

Former Member
0 Kudos

Hi! p256960

how to create Web Module projects ? can you give me the method ?

Thanks!

Former Member
0 Kudos

hi,

switch to j2ee perspective,

new->webmodule project.

create the jsp or what ever content u want

inthe webcontent folder

bulid a war for that project

then create an Enterprise application project for that,

there u select the web module project for which u want to bulid application archive

bulid the application archive then deploy the ear to the j2ee iengine.

Regards,

Satya.